← All components
Stagger
StaggerLinear stagger — children rise into view in sequence with a tunable per-child step.
First to rise.
Then this one.
Last, a beat later.
Installation
One command drops the source into your repo — editable, with the provider and motion pulled in automatically.
npx shadcn add https://motion.asmitsah.dev/r/stagger.jsonPrerequisiteInstall the provider base first
This component imports from @/lib/motion and needs <MotionProvider> mounted in your root layout — install the base once, before copying this component.
npx shadcn add https://motion.asmitsah.dev/r/provider.jsonStep 1Install the runtime dependency
npm install motionStep 2Copy the source into
components/motion/stagger.tsxcomponents/motion/stagger.tsx
Usage
Basic
Wrap a list with Stagger and each direct StaggerItem rises in sequence, once, on scroll into view.
Grid
Works over any layout — className passes through, so a grid staggers just as well as a stack.
Custom cadence
Slow the step and add a lead delay to make a longer list read more deliberately.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| children | ReactNode | — | StaggerItem children — each rises in sequence. |
| className | string | — | Passed straight through — Stagger becomes your list/grid container. |
| style | CSSProperties | — | Inline style passthrough. |
| staggerChildren | number | feel.stagger (0.08) | Seconds between each child's animation start. |
| delayChildren | number | feel.staggerDelay (0.05) | Seconds before the first child animates. |
StaggerItem
| Prop | Type | Default | Description |
|---|---|---|---|
| children | ReactNode | — | Content for this one item. |
| className | string | — | Passed straight through to the item element. |
| style | CSSProperties | — | Inline style passthrough. |