React hooks and components to create parallax scroll effects for banners, images or any other DOM elements.
npm install react-scroll-parallax





React hooks and components to create parallax scroll effects for banners, images or any other DOM elements. Utilizes Parallax Controller to add vertical or horizontal scrolling based effects to elements. Optimized to _reduce_ jank on scroll and works with SSR and SSG rendered React apps.
If you're coming from V2, here's a migration guide.
With npm
```
npm install react-scroll-parallax
or pnpm
``
pnpm add react-scroll-parallax
Create effects with a hook:
`jsx`
function Component() {
const parallax = useParallax({
speed: -10,
});
return ;
}
or with a component:
`jsx`
function Component() {
return (
);
}
Read the documentation for setup and usage instructions.
- Usage
- Usage with NextJS 13
- How it works
- Storybook v3 - Source Code
- Demo 1 - Source Code
- Demo 2 - Source Code (old 2.x version)
- useParallax()
- useParallaxController()
-
-
-