Giter VIP home page Giter VIP logo

react-rellax-wrapper's People

Contributors

dependabot[bot] avatar jupihawx avatar scottjr632 avatar thundermiracle avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

react-rellax-wrapper's Issues

Setting Wrapper

Hi,

Thanks for making the rellax wrapper!

I was wondering how you reference the wrapper when setting relativeToWrapper={true}?

Accessing through id, className or ref does not work.

parametters like "xs, mobile, etc..." does not work.

Hello.
I am trying to have different speeds for different viewports. For example, if I want a parallax on desktop, but not on something smaller, I think it would go like this (I am using Gatsby).

`

    <RellaxWrapper xs={0} mobile={0} tablet={0} speed={-7}>
      <Img
        className={classes.moutain}
        fluid={data.moutain.childImageSharp.fluid}
      />
    </RellaxWrapper>

    <RellaxWrapper xs={0} mobile={0} tablet={0} speed={0}>
      <Img
        className={classes.front}
        fluid={data.front.childImageSharp.fluid}
      />
    </RellaxWrapper>`

But it does not seem to work at all, I have a fixed image from +/- 570 px to 1200px. But under that 570px the parallax effect appears again. Do you know why?
Thanks!

Add speed and center to interface

Hello and thanks for this life saving wrapper for Rellax.

Can you please add speed and center to interface so we can get rid of ts-ignore comments:

Screenshot 2020-07-30 at 16 23 34

You can see here that its not in the interface, and if you add it manually the TS error is gone:

Screenshot 2020-07-30 at 16 24 27

Thanks in advance!

Include React as a peer dependency

What needs to change?

React (and possibly React DOM) should be included as a peer dependency, rather than a direct dependency.

Why should it change?

The problem is that if a consumer of react-rellax-wrapper is using a different version of React (such as the latest v17), React will actually be installed twice.

When this happens, hook calls may become broken. See: https://reactjs.org/warnings/invalid-hook-call-warning.html#duplicate-react

Useful links

See: https://nodejs.org/en/blog/npm/peer-dependencies/

Also, great library by the way! Thanks

Poor mobile performance, jittery animation

The animation on mobile is unusable, it's unfortunate since this library has more functionality than the others. I tried some images with this library and compared them to the other parallax libraries, unfortunately, the others outperformed this library.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.