Scroll to see parallax effect
pnpm dlx shadcn@latest add https://ui.saturation.io/r/parallax.jsonTailwind v4 — Source Scanning
Saturation UI copies component source into your project via the shadcn registry (no npm package). If Tailwind v4 isn't scanning your components directory, add this to your CSS entry file:
@source "../components";This ensures all utility classes in CVA variants and data attribute selectors are included in your build.
import { Parallax } from "@/components/ui/parallax"<Parallax speed={-0.1}>
<img src="/hero.jpg" alt="Hero" />
</Parallax>| Prop | Type | Default | Description |
|---|---|---|---|
speed | number | -0.1 | Parallax speed factor. Negative = moves slower than scroll (recedes), positive = faster. |
className | string | — | Additional CSS classes. |
children | React.ReactNode | — | Content to apply parallax effect to. |
On This Page