Design System
Data display

Timeline

A vertical sequence of dated events such as claim history, an approval trail or an audit log.

Purpose

A timeline tells the story of one record over time — what happened to a claim, who approved a guarantee letter, what an audit trail recorded. Each entry is an event: a tone-coloured icon chip, a title, an optional description and a timestamp, joined by a connector rail.

Two close relatives to triage against:

  • Activity feed — the card-friendly widget for a stream of recent events with hoverable rows and typed product icons. Timeline is the lower-level rail for a record's own history.
  • Stepper — for steps the user still has to take. A timeline looks backwards; a stepper looks forwards.

Example

Newest first, and last on the final entry to close the rail.

  1. Claim approved

    Today, 09:41

    Approved by claims team A — MYR 85.00 payable.

  2. Under review

    Yesterday

    Routed to medical review for consultation-fee check.

  3. Additional document requested

    26 Jul

    Receipt image was unreadable; member re-uploaded.

  4. Claim submitted

    25 Jul

    Submitted via member app — Klinik Mediviron, KL Sentral.

Claim history
import { Timeline, TimelineItem } from "@healthmetrics/ui/timeline";

<Timeline>
  <TimelineItem tone="success" glyph="check_circle" title="Claim approved" time="09:41" />
  <TimelineItem tone="neutral" glyph="receipt_long" title="Claim submitted" time="Mon" last />
</Timeline>;

Tones

tone colours the icon chip by outcome; glyph is any Material Symbols name (default circle).

  1. Neutral — routine events

    now
  2. Success — approved, completed

    now
  3. Warning — needs attention

    now
  4. Info — in progress, routed

    now
  5. Destructive — denied, failed

    now
ToneChip tokens
neutral--accent / --accent-foreground
success--success-subtle / --success-text
warning--warning-subtle / --warning-text
info--info-subtle / --info-text
destructive--destructive-subtle / --destructive-text

Structure

The tokens behind the rail.

PropertyValue
Chip32px circle (size-8), 16px glyph
Connector1px --border, runs from below the chip to the next entry
Item gap12px chip-to-text (gap-3), 24px between entries (pb-6)
Title14px / Inter 500 (text-sm font-medium)
Description14px --muted-foreground
Timestamp12px --muted-foreground, right-aligned on the title line

Best practices

Do

  • Order newest first — the current state is what readers came for.
  • Set last on the final entry; the connector does not stop by itself and a dangling rail reads as a missing event.
  • Choose tone by outcome (approved → success, denied → destructive) and keep the mapping consistent across the product.
  • Write titles as events — "Claim approved", not "Approval".

Don't

  • Use it for steps still ahead of the user — that is Stepper's job.
  • Rely on chip colour alone to carry the outcome; the title must say it in words.
  • Load an unbounded audit log into one timeline — page it or collapse older entries.
  • Rebuild the card-wrapped feed by hand — Activity feed is that composition.

Accessibility & keyboard

  • Renders a semantic ordered list (<ol>/<li>), so screen readers announce each event's position and the total count — the sequence is real structure, not just visuals.
  • The connector is aria-hidden; the glyph is decorative and hidden by default. All meaning lives in the title, description and timestamp text.
  • Tone is colour plus nothing — which is fine only because the title carries the outcome in words. Keep it that way.
  • time renders plain text, not a <time> element — prefer unambiguous formats ("26 Jul") and include the year once entries cross it.
  • Keyboard: none — the timeline is non-interactive. Links inside a description receive focus in DOM order.

Props

Timeline is a styled <ol> with no props of its own. TimelineItem:

PropTypeDefaultDescription
glyphstring | undefined"circle"Material Symbols glyph shown in the chip.
tone"neutral" | "success" | "warning" | "info" | "destructive" | undefined"neutral"Tone of the icon chip (Figma variant).
titlerequiredReact.ReactNode—Event title.
descriptionReact.ReactNode—Supporting line under the title.
timeReact.ReactNode—Right-aligned timestamp.
lastboolean | undefined—Hide the connector below this item (set on the last entry).
Timeline in Storybook

On this page