Stagger group
Animates a group of items into view one after another.
Type
Form
Light
stagger-group-basic-demo.tsx
Installation
The CLI adds the files, packages, theme variables, and Tailwind plugin that this component uses. Before you run it, set up your project.
npm
yarn
pnpm
bun
Composition
StaggerGroupStaggerItem
List
- 01Write the brief
- 02Choose the typefaces
- 03Send the proofs
stagger-group-demo.tsx
Timing
In a long group the delay gets shorter, so the last item starts within 0.6 seconds.
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
stagger-group-timing-demo.tsx
API reference
StaggerGroup
- as: "div" | "ul" | "ol" = "div"
- Use ul or ol with li StaggerItem children for a semantic list.
- trigger: "mount" | "in-view" = "in-view"
- Start the sequence on mount, or the first time the group comes into view.
- stagger: number = 0.08
- Delay in seconds between StaggerItem children. A long group uses a shorter delay, so the last item starts within 0.6 seconds.
StaggerItem
- as: "div" | "li" = "div"
- Element that receives the group animation.