Skip to content

NewMCP server for your coding agent. Set it up ›

Nexus UI
Get Pro

Cinematic Card Deck, animated React component

A deck of poster cards in 3D: the front card peels away on its bottom edge while the cards behind rise to take its place, leaning back as the deck moves and springing upright when it stops. Swipe or fling it, scroll the wheel over it, use the arrow keys or the progress pills, or set scrollLinked to deal it from page scroll.

  • Free
  • Cards
  • Scroll
  • 3D
  • Spring

Ticks each time a new card comes to the front from your drag, wheel, keys or progress pills. Sound is off on this site until you switch it on.

Like Cinematic Card Deck? 256 more are in Pro.

Pro unlocks all 256 Pro components, every template and block, and everything we release next. Cinematic Card Deck stays free.

Play with it

Move the controls and watch it change. Copy code gives you a snippet with only the props you changed.

01/ 04Foundation

Launch Systems

Reusable sections, shared spacing and motion that feels designed from the first frame.

Card 1 of 4: Launch Systems
Swipe, scroll or use the arrow keys.

Props

PropTypeDefaultWhat it does
cards4 sample cardsCards from front to back, each { title, description, tag?, cardColor?, accentColor?, imageUrl? }.
intensity"standard"How far the back cards recede and how hard the front card peels away.
exitDirection"up"Which way a finished card peels off (and which way to swipe).
cardWidth340Card width in px; the deck shrinks to fit narrower parents.
cardHeight220Card height in px, kept as an aspect ratio when the deck shrinks.
borderRadius"24px"Card corner radius.
smoothing0.60 is snappy, 1 is floaty: sets the spring that follows the target card.
showProgresstrueProgress pills that show and pick the front card.
progressPosition"bottom"Where the pills sit.
showAccenttrueAccent bar on the front card.
showAmbientGlowtrueSoft light in the front card's accent colour behind the deck.
glowIntensity0.35Opacity of the ambient light, 0 to 1.
scrollLinkedfalseDrive the deck from page scroll: the root becomes sectionHeight vh tall with a sticky stage.
sectionHeight300Scroll distance in viewport heights when scrollLinked.
scrollContainerRef—Scrolling element to track when scrollLinked (defaults to the window).
onChange—Called with the new front card index.
hint"Swipe, scroll or use the arrow keys."Caption under the deck. An empty string hides it.
autoplayfalseDeals through the deck every 2.4s until someone touches it.
className—Extra classes for the root.
enableSoundtruePlays interface sounds on interaction. They follow the sound switch (setSoundsEnabled, on by default) and stay silent on hover. Autoplay makes the same sounds once the visitor has used the page. Pass false to silence this component.

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/cinematic-card-deck
  2. 4

    Check what was added

    With a project made as in the Quick Start (a src/ folder), these files land in it:

    components/
    cinematic-card-deck/
    cinematic-card-deck.tsx
    index.ts
  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 { CinematicCardDeck } from "@/components/cinematic-card-deck";
    
    export default function Page() {
      return (
        <main>
          <CinematicCardDeck />
        </main>
      );
    }

Like Cinematic Card Deck? 256 more are in Pro.

Pro unlocks all 256 Pro components, every template and block, and everything we release next. Cinematic Card Deck stays free.

About Cinematic Card Deck

Cinematic Card Deck pins a stack of large cards in a sticky viewport and moves them with the page scroll. As the visitor scrolls, the front card tilts away in 3D and the cards behind it move forward, while progress dots show the position and the deck leans slightly toward the cursor. Each card takes a title, description, tag, colors and an optional background image, and the depth, smoothing, glow and section height are all set through props.

Good for

  • Scroll-driven feature storytelling
  • Product pillars and value props
  • Case study chapter sections
  • Portfolio project showcases

Cinematic Card Deck questions

How does the scroll effect work?

The section is `sectionHeight` vh tall (default 400) with a sticky viewport inside it, and scroll progress through the section decides which card is in front. `smoothing` controls how softly the cards follow the scroll.

Can I use it inside a scrollable container?

Yes. Pass the container as `scrollContainerRef` and set `viewportHeight` to match its height.

How do I add my own cards?

Pass `cards` as an array of `{ title, description, tag, cardColor, accentColor, imageUrl }`; everything except title and description is optional.

How do I make the effect stronger or calmer?

Set `intensity` to "subtle", "standard" or "cinematic" and `exitDirection` to "up" or "down". `showProgress`, `showAmbientGlow` and `glowIntensity` control the extras.

Does it make sound, and how do I turn it off?

Ticks each time a new card comes to the front from your drag, wheel, keys or progress pills. Sounds are synthesised with the Web Audio API, so there are no audio files, and they only play after a click or key press. Pass `enableSound={false}` to silence this component, or call `setSoundsEnabled(false)` from `@/lib/ui-sounds` to switch every sound off at once. The CLI installs `@/lib/ui-sounds` with the component.