Skip to content

NewMCP server for your coding agent. Set it up ›

Nexus UI
Get Pro

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

PropTypeDefaultWhat it does
layers—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"Which way the scene scrolls.
scrollHeight420Height of the scene in px.
distance1.6How far there is to scroll, in scene heights.
heading"Motion that moves people"Heading that drifts up and fades as you scroll.
description"Every layer travels at its own speed."Line under the heading.
hint"Scroll inside the scene."Hint shown until the scene is scrolled. An empty string hides it.
backgroundColor—Overrides the sky colour.
showGridfalseDraw a faint grid over the sky.
showGlowtrueDraw the sun (the moon in dark mode) and its glow.
perspective1200Perspective for custom layers, in px.
autoplayfalseScrolls the scene down and back up every few seconds until someone touches it.
className—Classes for the frame.

Add it to your project

  1. 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 creates components.json and the cn() helper in src/lib/utils.ts:

    npx shadcn@latest init -d

    Starting from nothing? The Quick Start walks through the whole thing.

  2. 2

    Connect the registry

    Run this once per project. It writes the Nexus UI entry into components.json for 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.

  1. 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
  2. 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.ts
    motion-layer-scroller.tsx
  3. 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:

  4. 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

Guides