#141
With variants
A Timeline of an order's five tracking events, coloured by variant, with descriptions and timestamps.
Hand this to your AI. It names the exact library parts, timings and accessibility promises of this demo.
Build the "With variants" pattern (@codeatlasdev/ui demo #141, display/timeline) in my app.
Call get_demo({ ids: ["#141"] }) first and keep its structure. It needs @codeatlasdev/[email protected].
Use: Order, shipment or ticket status trails where completed, in progress and pending steps need different emphasis.
Keep these library parts, with the props and tokens the demo uses:
- Timeline from "@codeatlasdev/ui"
Behaviour to keep:
- `<Timeline items={events} />`
- 5 events with `label`, `description`, `date` and `variant`; the last, Delivered, has no `description`
- `variant: 'success' as const` on Order created and Payment confirmed
- `variant: 'info' as const` on Picking
- `variant: 'default' as const` on Awaiting shipment and Delivered
- Wrapped in `.wrap` with `max-width: 440px`
Reduced motion: the demo handles it; keep that branch.
Keyboard: not an interactive control.
Change only the copy and the data. Use the theme tokens (--ca-*), never raw colours. Library parts
- Timeline
@codeatlasdev/ui
How it is built
- `<Timeline items={events} />`
- 5 events with `label`, `description`, `date` and `variant`; the last, Delivered, has no `description`
- `variant: 'success' as const` on Order created and Payment confirmed
- `variant: 'info' as const` on Picking
- `variant: 'default' as const` on Awaiting shipment and Delivered
- Wrapped in `.wrap` with `max-width: 440px`
Related
Loading source.