jscottsmith/react-scroll-parallax
์๊ฐ
๐ฎ ๋ฐฐ๋, ์ด๋ฏธ์ง ๋ฐ ๊ธฐํ DOM ์์์ ์์ฐจ ์คํฌ๋กค ํจ๊ณผ๋ฅผ ์ ์ฉํ๋ React ํ ๊ณผ ์ปดํฌ๋ํธ์ ๋๋ค.
๋์์ธ ๋ฐ ๋ฏธ๋์ด์ธก์ ๋ ์คํ ์ฆ๊ฐ
- in 24h
- 0
- in 7 days
- +1
- in 15 days
- +1
- in 1 month
- +1
์๋ก ๊ฒน์น๋ ๊ธฐ๊ฐ์ ์์ฆ๊ฐ๋์ด๋ฉฐ ์ผ๋ณ ํฉ๊ณ๊ฐ ์๋๋๋ค. ์ธก์ ๊ฐ์ด ์์ผ๋ฉด ๋น์ ๋ก๋๋ค. ์คํ๋ ๊ด์ฌ๋๋ฅผ ๋ํ๋ด๋ฉฐ ํ์ง์ ๋ณด์ฅํ์ง ์์ต๋๋ค.
README.md
OriginalReact Scroll Parallax
React hooks and components to create scroll-driven parallax effects for banners, images, or any other DOM elements. Built on Parallax Controller, powered by the Web Animations API where each element is driven by a ScrollTimeline or ViewTimeline. Apply translate, rotate, scale, and opacity keyframes with scroll progress on the compositor and don't block the main thread.
Install
With npm
npm install react-scroll-parallax
Try 4.0 Beta
Uses the latest Parallax Controller built with Web Animations API for scroll-driven animations.
If you're upgrading from V3, here's a migration guide to the v4 beta.
npm install react-scroll-parallax@beta
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
- Storybook v3 - Source Code
- Demo 1 - Source Code
- Horizontal Scroll - Source Code
- Full Page Banner - Source Code
- Demo 2 - Source Code (old 2.x version)
Docs: Hooks
Docs: Components
๊ด๋ จ ํ๋ก์ ํธ ์ดํด๋ณด๊ธฐ
๋ถ๋ฌ์ค๋ ์คโฆ
