← Inventory
Stagger
Orchestrates staggered entrance animations for child StaggerItem components.
Uses framer-motion's staggerChildren variant pattern under the hood.
Terracotta
Oak
Brushed steel
Sage linen
Usage
import { Stagger, StaggerItem, StaggerItemProps, StaggerProps } from "@desk/ui/components/stagger";Best practices
Wrap
StaggerItemchildren (not raw elements) —Staggeronly drives thehidden→visiblevariant orchestration; the items own their actual entrance animation.Tune rhythm with
stagger(gap between items) anddelay(lead-in) on the parent, rather than hand-setting per-child transition delays.Needs
ReducedMotionProviderin the tree so the orchestrated entrance both runs and honours the reduced-motion setting.
Props
Stagger
| Prop | Type | Default | Description |
|---|---|---|---|
| delay | number | 0 | Initial delay before the first child starts animating (seconds). |
| stagger | number | 0.15 | Delay between each child item animating in (seconds). |
StaggerItem
| Prop | Type | Default | Description |
|---|---|---|---|
| animation | StaggerAnimation | "fadeUp" | Animation preset applied to this item. |
Also exports
- interface
StaggerItemProps - interface
StaggerProps