Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

X-oss-byte/react-scroll-parallax

Repository files navigation

React Scroll Parallax

NPM Version Latest NPM Downloads Codecov Rate on Openbase

Test and Lint Storybook Storybook

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.

Install

With npm

npm install react-scroll-parallax

or yarn

yarn add react-scroll-parallax

Example

Create effects with a hook:

function Component() {
 const parallax = useParallax({
 speed: -10,
 });
 return <div ref={parallax.ref} />;
}

or with a component:

function Component() {
 return (
 <Parallax speed={-10}>
 <div />
 </Parallax>
 );
}

Getting Started

Read the documentation for setup and usage instructions.

Demos

Docs: Hooks

Docs: Components

About

🔮 React hooks and components to create parallax scroll effects for banners, images or any other DOM elements.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 93.7%
  • SCSS 2.4%
  • CSS 2.3%
  • JavaScript 1.6%

AltStyle によって変換されたページ (->オリジナル) /