A staggered list with a component
Build a notification row once, expose its text as props, place four copies with their own start times, and add a read variant.
A list is the classic case for components: one row, many copies, each with its own text and timing. When you change the row, every copy follows. In this walkthrough you build a notification row, turn it into a component, expose its title and detail as props, stagger four instances by 60 ms and add a quieter “read” variant. About twenty minutes.
1. Build one row
- Press ⌘N and send: “A 390 × 520 canvas. One notification row: a rounded card 320 × 68, a round accent icon on the left, a title ‘New message’ and a smaller detail ‘Tap to open’. The card rises 14 pt and fades in on a 0.45 s spring; the content follows 30–100 ms later.”
- Check the row on the stage. Adjust anything by hand now: it's cheaper before you make copies.
2. Turn it into a component
- Select the card, icon, title and detail (marquee them, or select their group).
- Press ⌥⌘K (Stage → Create Component), or click Create component in the selection bar.
- The layers become a component named after the selection, and one instance takes their place, marked in magenta. Its timing is kept: the instance starts at the first keyframe.
3. Expose props
- Double-click the instance to open the component. The timeline header shows ‹ Main timeline › ◆ Row, and the stage pill names the component with Done.
- Select the title text. The inspector shows Expose as prop (◇).
- Click ◇ next to Text. It turns into ◆ with the prop's name, taken from the layer's name (
titlefor a layer called title). Rename it from the component's Props list (right-click → Rename…) if you like. - Select the detail text and expose its Text too (
detail). - Click Done or press esc to go back to the main timeline.
4. Place four copies
- Select the instance and press ⌘D three times. Arrange the copies 84 pt apart (drag with ⇧ to lock the axis, or use Stage → Align → Distribute).
- Select the second row. In the inspector's Props, type a new title and detail, for example “Payment received” and “€ 24.00 from Mia”.
- Fill in the third and fourth rows the same way.
5. Stagger their clocks
Each instance plays the component on its own clock. The Instance section sets it:
| Setting | Row 1 | Row 2 | Row 3 | Row 4 |
|---|---|---|---|---|
| Start | 0 s | 0.06 s | 0.12 s | 0.18 s |
| Speed | 1× | 1× | 1× | 1× |
| Play | Once | Once | Once | Once |
- Select row 2 and type
0.06in Start. Repeat for rows 3 and 4. - Or select all four and ask the AI “stagger the rows by 60 ms from the top”. Stagger works on instance clocks, so the component itself stays untouched.
- Play it. The list reads top to bottom as one gesture.
6. Add a read variant
- Open the component again (select an instance and press ⌘↓).
- In the stage pill, click the variant menu (Base) → Add Variant…. Enter set
stateand valueread, then Add. The stage now edits state: read. - Make the icon gray and the title softer. These changes are stored as differences from the base.
- Switch back to Base in the same menu and click Done.
- Select rows 3 and 4. In the inspector's Variants, set state to read.
7. Export
Press ⌘E → Motion (React). The scene has instances and no states, so you get one typed function component per component, with its props and variant set as a string union:
<Row title="Payment received" detail="€ 24.00 from Mia" delay={0.06} />
<Row title="Build finished" detail="main · 2 min ago" state="read" delay={0.12} />SwiftUI gets a View per component, Lottie a precomp per combination of props and variant.
Variations
- Nested icon swap: put an icon component inside the row and expose it as an Instance prop, so each row picks its icon. See Nested components and swaps.
- Looping loader: set a small spinner component's Play to Loop and place it in a longer scene.
- Hover a row: add a
hovervariant and a trigger with Set variant. See Triggers.