# M stacking cards 3

> Process steps — numbered steps stack sequentially on scroll

A shadcn/ui block from the [@cnippet](https://ui.cnippet.dev/) registry, listed on [shadcn.exchange](https://shadcn.exchange/r/cnippet/m-stacking-cards-3).

- Page, with a live preview: https://shadcn.exchange/r/cnippet/m-stacking-cards-3
- Screenshot: https://abzjhwgwpdpz7ua5.public.blob.vercel-storage.com/shots/cnippet/m-stacking-cards-3-light-8b75e49007137150.png
- Registry item: https://ui.cnippet.dev/r/m-stacking-cards-3.json
- Categories: stacking cards
- Listed: 2026-10-13, source last changed 2026-10-13

## Install

```bash
npx shadcn@latest add https://ui.cnippet.dev/r/m-stacking-cards-3.json
```

Run it in a project that has shadcn/ui set up. It adds the files below and installs what they depend on.

## Dependencies

- Registry items: `@cnippet/stacking-cards`

## Files

### `registry/default/motion-variants/m-stacking-cards-3.tsx`

```tsx
"use client";

import { useRef } from "react";
import {
  StackingCardItem,
  StackingCards,
} from "@/registry/default/motion/stacking-cards";

const steps = [
  {
    description: "Explore 164 animated components across 14 categories.",
    step: "01",
    title: "Browse",
  },
  {
    description: "Run npx cnippet@latest add <component> to add it.",
    step: "02",
    title: "Install",
  },
  {
    description: "Adjust props, variants, and Tailwind classes freely.",
    step: "03",
    title: "Customise",
  },
  {
    description: "Deploy production-ready animations with confidence.",
    step: "04",
    title: "Ship",
  },
];

export default function StackingCardsSteps() {
  const containerRef = useRef<HTMLDivElement>(null);

  return (
    <div className="relative h-56 overflow-y-auto px-6" ref={containerRef}>
      <StackingCards
        className="mx-auto h-[600px] w-full max-w-sm"
        scaleMultiplier={0.04}
        scrollOptions={{ container: containerRef }}
        totalCards={steps.length}
      >
        {steps.map((s, i) => (
          <StackingCardItem index={i} key={s.step} topPosition={`${i * 14}px`}>
            <div className="flex h-32 items-start gap-4 rounded-2xl border border-border bg-card p-5">
              <span className="font-black text-3xl text-primary/20">
                {s.step}
              </span>
              <div>
                <h3 className="font-bold text-foreground">{s.title}</h3>
                <p className="mt-0.5 text-muted-foreground text-xs">
                  {s.description}
                </p>
              </div>
            </div>
          </StackingCardItem>
        ))}
      </StackingCards>
    </div>
  );
}
```
