Parallax Section
Layered parallax section with foreground and background motion.
Scroll layers
Parallax storytelling
Guide attention with layered motion and smooth scroll timing.
Depth layers
Foreground content moves with a faster cadence.
Calm motion
Background shapes drift softly to create dimension.
Balanced focus
The message stays centered as the scene shifts.
Dependencies
- clsx
- tailwind-merge
- framer-motion
Files
- components/ui/parallax-section.tsx
Installation
Using shadcn CLI
npx shadcn add parallax-section --url https://ui.hampton.ioManual installation
Copy the component file to your project and install dependencies:
npm install clsx tailwind-merge framer-motionRelated Backgrounds Components
Animated Spotlight
Cursor spotlight overlay with spring follow and blur control.
Dot Pattern Background
Animated dot grid background with a soft wave motion.
Meteors Background
Animated meteor streaks background for hero sections or cards.
Morphing Blob
Animated SVG blob that morphs between shapes with smooth transitions. Perfect for dynamic backgrounds or visual interest.
Noise Texture Background
Subtle animated grain overlay for sections and cards.
Particle Field
Interactive particle field with floating particles that respond to mouse movement. Optional connection lines for a network effect.