Skip to content

React Timeline

An animated React timeline for activity feeds, audit logs, order tracking and changelogs that draws itself as you scroll. Use it as an activity feed or audit log with avatars, action badges and a Today group heading, where new events should slide in at the top and push the rest down smoothly.

npx shadcn@latest add https://lokendra-builds.github.io/sheenui/r/timeline.json
  1. Order placed

    Oct 27, 09:12

Activity feed

Avatars with action badges, rich titles, a comment, group headings and a plain dot for minor events. Press “Simulate activity”: the new event slides in at the top and the rest make room.

Activity

  1. Today
  2. Ada merged #482 into main

  3. Grace commented on #482

    Lovely. The glass fallback for reduced transparency reads much better now. Ship it!
  4. Production deploy finished

    v2.14.0 · 48 s · 0 errors
  5. Linus viewed the release notes

  6. Yesterday
  7. Build #1288 failed

    2 tests failed in breadcrumb.test.tsx
  8. Ada opened #482 Collapse breadcrumbs

Files to copy

5 folders · 6 files · 4 packages
From theme/src/
  • components/timeline/
  • hooks/{use-media-query.ts, use-preferences.ts}
  • motion/{gate.ts, tokens.ts}
  • lib/{cn.ts, no-script-reveal.tsx}
  • styles/
shadcn CLI
npx shadcn@latest add https://lokendra-builds.github.io/sheenui/r/timeline.jsonRegistry item: timeline. The styles need the Tailwind v4 glass UI setup.
The examples also use
  • components/avatar/
  • components/badge/
  • lib/{initials.ts, warn-once.ts}
npx shadcn@latest add https://lokendra-builds.github.io/sheenui/r/avatar.json https://lokendra-builds.github.io/sheenui/r/badge.json
Packages
pnpm add @base-ui/react clsx motion tailwind-merge

Order tracking

connector="accent" for the path already travelled, current for the live step (a soft pulse and aria-current), dashed for what has not happened yet.

  1. Order placed

  2. Packed

  3. Shipped

    Parcel SH-48213
  4. Out for delivery

    Arriving by 6 pm
  5. Delivered

    Expected today

Alternate (changelog)

Wide containers zig-zag around a centered rail with dates on the opposite side; narrow ones fall back to a list.

  1. v2.14Latest

    Liquid glass, layout components and a reduced-transparency mode that keeps every surface readable.
  2. v2.13

    Twenty new charts with table views, keyboard tooltips and color-blind-safe slots.
  3. v2.12

    Command palette, menus and a menubar with full keyboard support.
  4. v2.11

    Data table: sorting, filters, selection, CSV export.

Timeline

PropTypeDefaultDescription
layout"start" | "alternate""start""start" (default): markers on the inline start. "alternate": zig-zag around a centred rail on wide containers.
size"sm" | "md""md"Sets the marker and text size.
animatebooleantrueAnimate items as they scroll into view. Always off under reduced motion.
classNamestringNoneExtra classes for the <ol> that holds the items (set its spacing or width here).
aria-labelstringNoneSets the name of the list, e.g. “Activity”.

TimelineItem

PropTypeDefaultDescription
title (required)ReactNodeNoneWhat happened. Rich content is fine: "<b>Ada</b> merged <a>#42</a>".
timeReactNodeNoneSets when it happened, as shown ("2h ago", "Oct 30, 09:12").
dateTimestring | DateNoneMachine-readable date for the <time> element (and its hover title).
localestringNoneLocale for the full date in the hover title.
descriptionReactNodeNoneShows supporting text under the title.
iconReactNodeNoneIcon in a tinted disc. With avatar, a small badge on the avatar instead.
avatarReactNodeNoneAn avatar as the marker, e.g. <Avatar name="Ada Lovelace" size="sm" />.
toneTimelineTone"neutral"Colour of the marker: "neutral" (default), "accent", "success", "warning" or "danger".
currentbooleanfalseThe live step (order tracking): a soft pulse and aria-current="step".
connector"accent" | "solid" | "dashed""solid"Line from this item to the next: "solid" (default), "dashed" for not-yet-happened, "accent" for a completed path.
childrenReactNodeNoneExtra content under the text: a comment, attachments, a diff. Moves in, never fades (safe for glass).
classNamestringNoneExtra classes for the <li> of this entry (set its spacing or tone here).
contentClassNamestringNoneAdds a class name to the content column.

TimelineHeading

PropTypeDefaultDescription
classNamestringNoneExtra classes for the <li> of this entry (set its spacing or tone here).

Keyboard

KeysAction
TabNot focusable: the list is not focusable. Links and buttons inside items are normal tab stops.

Accessibility

  • An ordered list (<ol>): pass aria-label. Timestamps are <time dateTime> when you give dateTime.
  • The live step has aria-current="step"; markers and connector lines are decorative, so state is also written in words.
  • Marker pop and line draw do not run under reduced motion.

When to use Timeline

  • Use it for a project activity feed or an audit log where each entry has an avatar, a time and an action badge, grouped under headings such as Today, and a new entry slides in at the top. Use it as a vertical timeline in Tailwind for an order history or release notes.
  • Use it for order tracking, with connector="accent" on completed steps, a current step that pulses softly, and a dashed line to what has not happened yet.
  • Use layout="alternate" for a changelog or company history, where a wide container zig-zags around a centered rail with dates opposite, and narrow ones fall back to a plain list.
  • Skip it when the user must act on each stage in sequence; Stepper handles progress through a flow, and Data table is better for dense, sortable records of the same kind.
  • Pair it with Avatar for people markers, Badge for statuses in an item's content, and Skeleton while older events load.

Frequently asked questions

67 components pages in all: browse them on All components.

By Lokendra Singh Rathore (GitHub, opens in a new tab). Published , updated .