jscottsmith/react-scroll-parallax

Allow users to disable parallax from ParallaxProvider

ArthurSangouard opened this issue · 3 comments

I'm looking to disable parallax on mobile, but it seems that the way to do this is to toggle the disabled prop in every instance of useParallax or Parallax.
Letting users enable it from the root ParallaxProvider component would greatly simplify this.

That would also be helpful for accessibility for users who prefers-reduced-motion

Yep this is a great idea. I'll look into it as soon as I can.

Better late than never ;-)

Use the isDisabled prop.

<ParallaxProvider isDisabled>...</ParallaxProvider>

If there's any issues, let me know.