Skip to content

Timeline

Vertical or horizontal sequence of events with dots, connectors, and per-event colour and icon options.

  • stable
  • since v0.1.0
  • 2.2 kB
  • data-display
  • timeline
  • activity

Renders as an ordered list so screen readers announce position and total count; dots and connectors are aria-hidden.

Preview
Open
tsx

Three sizes are available: sm, md (default), and lg.

Preview
Open
tsx

Each TimelineDot accepts a colorSchemeaccent, neutral, success, warning, danger, or info — to signal event semantics.

Preview
Open
tsx

Pass icon (or children) to TimelineDot to render a glyph inside the marker.

Preview
Open
tsx

Pass orientation="horizontal" for a step-tracker layout — connectors run left-to-right and items wrap onto multiple lines when narrow.

Preview
Open
tsx
PropTypeDefaultDescription
orientation
"vertical"|"horizontal"
vertical
Lay items out vertically (top-to-bottom) or horizontally (left-to-right).
size
"sm"|"md"|"lg"
md
Density preset for dot size, gap, and connector thickness.
  • Renders as a semantic <ol> so screen readers announce position and total count.
  • Each TimelineItem is an <li>; the last item carries data-last="true" so the trailing connector can be hidden.
  • TimelineSeparator, TimelineDot, and TimelineConnector are aria-hidden — they’re purely decorative.
  • Provide a heading or aria-label on the <Timeline> itself when its purpose isn’t clear from surrounding context.
  • Colour is never the sole carrier of meaning — pair colorScheme with a textual cue in TimelineContent.
  • Switch orientation to "horizontal" for onboarding step trackers and progress checklists.
  • Use TimelineDot variant="outline" for “pending” events; variant="solid" for completed ones.
  • Pass an icon to TimelineDot (e.g. a checkmark SVG) to signal event type at a glance.
  • Compose TimelineContent with Card or Stat for dense activity feeds.