[ Data Display ]

Timeline

A vertical activity feed. Each item has a tinted icon on a connecting line, a header with title, time and an unread dot, an optional description, a bordered content card and an actions row.

2 examplesDark modeAccessible

Import#

import { Timeline, TimelineItem } from 'reusify-ui';

When to use#

  • Activity and notification feeds: comments, uploads, status changes.
  • Audit logs and order histories where the sequence matters.
  • For a checklist the user completes, use Checklist; for step progress, StepList or StepPill.

Examples#

Activity feed#

content renders inside a bordered card; actions sit below it. The unread dot is announced as "Unread".

  1. John Traveller2 min ago
    has commented on your video
    Great post on UI! A well-designed UI can have a significant impact on the user experience.
  2. John Traveller5 min ago
    has commented on your video
    Awesome video! Keep up the great work!
  3. John Traveller12 min ago
    Added a file
<Timeline>
  <TimelineItem
    icon={<FiPlus />}
    color="success"
    title="John Traveller"
    time="2 min ago"
    description="has commented on your video"
    unread
    content="Great post on UI! …"
  />
  <TimelineItem
    icon={<FiMessageSquare />}
    color="#db2777"
    title="John Traveller"
    time="5 min ago"
    description="has commented on your video"
    unread
    content="Awesome video! Keep up the great work!"
    actions={
      <>
        <Button size="sm" pill>Reply</Button>
        <Button size="sm" variant="text" color="secondary">Dismiss</Button>
      </>
    }
  />
  <TimelineItem icon={<FiFileText />} color="#059669" title="John Traveller" time="12 min ago" description="Added a file" />
</Timeline>

Compact log#

Without content the items stack tightly, like an audit log. connector={false} hides the line.

  1. Payment received09:12
  2. Order packed11:40
  3. Out for delivery14:05
<Timeline>
  <TimelineItem icon={<FiCheck />} color="success" title="Payment received" time="09:12" />
  <TimelineItem icon={<FiClock />} color="warning" title="Order packed" time="11:40" />
  <TimelineItem icon={<FiPlay />} color="info" title="Out for delivery" time="14:05" />
</Timeline>

Used in designs#

Timeline in real layouts: this design uses it. Open one to try it and copy the code.

API reference#

<Timeline />

Renders an <ol>. Children are TimelineItem elements.

connectortrue
boolean

Draw the line between icons.

<TimelineItem />

Renders an <li>; other props (onClick, data-*) go on it.

icon-
ReactNode

Icon in the tinted circle.

color'primary'
'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | CSS color

Tint of the icon circle.

title-
ReactNode

Bold first line (who / what).

time-
ReactNode

Muted text after the title.

description-
ReactNode

Muted line under the title.

unreadfalse
boolean

Blue dot on the right, labelled "Unread".

content-
ReactNode

Rendered inside a bordered card.

actions-
ReactNode

Buttons below the content.

children-
ReactNode

Anything else, rendered after content.

Accessibility#

  • Uses an ordered list, so screen readers announce the number of events and their order.
  • Icons and the connector are decorative; titles and descriptions carry the meaning.
  • The unread dot has role="img" and aria-label="Unread".