SwipeUI

Timeline

Activity history with explicit status text and a reading-direction-aware rail.

npx @swipeui/cli add timeline
Variant
Preset
Material
Scheme
Feel
Real free component with a browser animation bridge. Native motion, haptics and materials need a device.

When 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.tsx and 5 shared helpers.
  • Installs react-native-reanimated, react-native-worklets, uniwind, clsx, tailwind-merge, class-variance-authority. In Expo apps it uses npx expo install so versions match your SDK.

Usage

app/order.tsx
import { Timeline } from '@/components/swipeui/ui/timeline';

<Timeline items={orderSteps} />;

API reference

PropTypeDefaultDescription
pulseCurrent?booleantrue

Pulse the warning ring of current events; reduced motion keeps it still.

surface?"plain" | "raised"'raised'

Group treatment.

density?"compact" | "regular"'regular'

Event spacing.

showStatusLabels?booleantrue

Show status words beside timestamps. Spoken status remains available.

animateProgress?booleantrue

Animate completed connections.

motion?MotionOverrideapp feel

Shared progress character.

messages?{ complete?: string; current?: string; upcoming?: string; }—

Built-in status text; explicit entries override legacy statusLabels.

itemsreadonly TimelineItem[]—

Events in display order; caller owns chronological sorting.

statusLabels?readonly [string, string, string]—

Localized complete/current/upcoming labels.

className?string—

Root classes.

style?StyleProp<ViewStyle>—

Root layout escape hatch.

testID?string—

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 select and ambient motion roles, so it follows your app's feel. Pass motion to 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 onSupported
Expo SDK 57Yes
Expo SDK 58Yes
React Native CLI (with Expo modules)Yes
Expo GoYes
iOSYes
AndroidYes

This table describes API support and static bundle checks. Native runtime, device accessibility and bare Uniwind compatibility remain pending.

Related items