Motion Layer Scroller, animated React component
A landscape built from paper-cut layers inside its own scroll frame: scroll through it and each ridge rises at its own speed while the sun sinks behind them. When you stop, the layers settle on a soft spring with a small overshoot; pass your own layers to build any parallax scene.
- Free
- Motion Effects
- Scroll
- Spring
Like Motion Layer Scroller? 256 more are in Pro.
Pro unlocks all 256 Pro components, every template and block, and everything we release next. Motion Layer Scroller stays free.
Play with it
Move the controls and watch it change. Copy code gives you a snippet with only the props you changed.
Props
| Prop | Type | Default | What it does |
|---|---|---|---|
| layers | LayerConfig[] | — | Your own layers: { id, content, xRange?, yRange?, scaleRange?, rotateRange?, opacityRange?, blurRange?, className? }, mapped from the start to the end of the scroll. Leave out for the landscape; [] shows just the heading. |
| direction | "vertical" | "horizontal" | "vertical" | Which way the scene scrolls. |
| scrollHeight | number | 420 | Height of the scene in px. |
| distance | number | 1.6 | How far there is to scroll, in scene heights. |
| heading | string | "Motion that moves people" | Heading that drifts up and fades as you scroll. |
| description | string | "Every layer travels at its own speed." | Line under the heading. |
| hint | string | "Scroll inside the scene." | Hint shown until the scene is scrolled. An empty string hides it. |
| backgroundColor | string | — | Overrides the sky colour. |
| showGrid | boolean | false | Draw a faint grid over the sky. |
| showGlow | boolean | true | Draw the sun (the moon in dark mode) and its glow. |
| perspective | number | 1200 | Perspective for custom layers, in px. |
| autoplay | boolean | false | Scrolls the scene down and back up every few seconds until someone touches it. |
| className | string | — | Classes for the frame. |
Add it to your project
- 1
Set up your project once
You need a Next.js project with Tailwind CSS and the
@/import alias. In its root folder, run this once. It createscomponents.jsonand thecn()helper insrc/lib/utils.ts:npx shadcn@latest init -d
Starting from nothing? The Quick Start walks through the whole thing.
- 2
Connect the registry
Run this once per project. It writes the Nexus UI entry into
components.jsonfor you:npx shadcn@latest registry add "@nexus-labs=https://www.nexus-ui.com/api/registry/{name}"Type it exactly as shown.
{name}is filled in by the CLI with the component you ask for, so you never replace it.
- 3
Add the component
Run this from your project root. It adds the component, the helpers it imports and its npm packages.
npx shadcn@latest add @nexus-labs/motion-layer-scroller
- 4
Check what was added
With a project made as in the Quick Start (a
src/folder), these files land in it:components/motion-layer-scroller/index.tsmotion-layer-scroller.tsx - 5
Copying by hand? Skip the registry
Instead of steps 2 and 3 you can copy the files yourself, with no registry and no API key. Step 1 still applies, so that
cn()exists. Install the packages:npm install framer-motion
Then show the source and create each file at the path it gives:
- 6
Use it in a page
Installing only adds the files. Import the component in a page and render it. The Usage tab on the preview shows a fuller example with props:
// src/app/page.tsx import { MotionLayerScroller } from "@/components/motion-layer-scroller"; export default function Page() { return ( <main> <MotionLayerScroller /> </main> ); }
Like Motion Layer Scroller? 256 more are in Pro.
Pro unlocks all 256 Pro components, every template and block, and everything we release next. Motion Layer Scroller stays free.
About Motion Layer Scroller
The Motion Layer Scroller is a scroll-driven parallax depth engine where each layer moves at an independent speed and axis as the user scrolls the page. Built with Framer Motion useScroll and useTransform, layers can move vertically, horizontally, or at angles with configurable speed multipliers. Composing multiple layers with different depths creates genuine parallax scenes from flat content. Use it for immersive hero sections, product story sections, and scroll-storytelling experiences.
Good for
- Parallax hero and section designs
- Immersive product story sections
- Scroll-driven narrative experiences
- Depth-layered feature showcases