Parallax Scroll

Parallax scrolling effect with configurable speed and direction.

scrollparallaxanimated

Installation

Terminalbash
npx motioncraft add parallax-scroll

Usage

parallax-scroll.tsxtsx
import { ParallaxScroll } from "@/components/scroll/parallax-scroll";

<ParallaxScroll speed={0.3}>
  <img src="/hero.jpg" alt="Hero" />
</ParallaxScroll>

Props

PropTypeDefaultDescription
children*ReactNodeContent to parallax
speednumber0.5Parallax speed

Related Components