Timeline
Activity history with explicit status text and a reading-direction-aware rail.
npx @swipeui/cli add timelineWhen to use it
- Order tracking: placed, packed, shipped, delivered.
- Activity history in a ticket, a project or an account.
- A day's schedule with completed, current and upcoming items.
When not to use it
- Step-by-step flows people move through. Use Stepper.
- Calendars. Use Calendar.
- Feeds of rich content. Use cards.
Installation
Run this from your app's root. If SwipeUI isn't set up yet, run npx @swipeui/cli init first; it sets up Uniwind, the theme tokens and the cn helper.
npx @swipeui/cli add timeline- Adds
components/swipeui/ui/timeline.tsxand 5 shared helpers. - Installs react-native-reanimated, react-native-worklets, uniwind, clsx, tailwind-merge, class-variance-authority. In Expo apps it uses
npx expo installso versions match your SDK.
Usage
import { Timeline } from '@/components/swipeui/ui/timeline';
<Timeline items={orderSteps} />;API reference
| Prop | Type | Default | Description |
|---|---|---|---|
pulseCurrent? | | | Pulse the warning ring of current events; reduced motion keeps it still. |
surface? | | | Group treatment. |
density? | | | Event spacing. |
showStatusLabels? | | | Show status words beside timestamps. Spoken status remains available. |
animateProgress? | | | Animate completed connections. |
motion? | | | Shared progress character. |
messages? | | — | Built-in status text; explicit entries override legacy statusLabels. |
items | | — | Events in display order; caller owns chronological sorting. |
statusLabels? | | — | Localized complete/current/upcoming labels. |
className? | | — | Root classes. |
style? | | — | Root layout escape hatch. |
testID? | | — | Root identifier. |
Composition and behavior
- items in display order with a status each.
- statusLabels translate the status words.
Behavior and gestures
- Static; it shows events along a vertical rail.
Accessibility
- Each event's status is written out (complete, current, upcoming), not shown by colour alone.
- Status labels can be translated.
- The rail is decorative and follows reading direction.
Motion
- Uses the
selectandambientmotion roles, so it follows your app's feel. Passmotionto tune this one instance. - Completed connections fill on the select role; reduced motion lands immediately.
Performance
- Simple rows; sort events in your app.
Notes for AI
- Pass items already sorted; each has an id, title, optional time and description, and status.
Compatibility
| Runs on | Supported |
|---|---|
| Expo SDK 57 | Yes |
| Expo SDK 58 | Yes |
| React Native CLI (with Expo modules) | Yes |
| Expo Go | Yes |
| iOS | Yes |
| Android | Yes |
This table describes API support and static bundle checks. Native runtime, device accessibility and bare Uniwind compatibility remain pending.