Xzero UI
Pro library

Timeline

Follow what happened, newest first, grouped by day.

$ pnpm dlx shadcn@4.23.0 add @xzero-ui/timeline
Live · keyboard ready

When to use

When not to use

Installation

Register both Xzero UI namespaces in your project's components.json:

{
  "registries": {
    "@xzero-ui": "https://mcp.xzero.co.uk/r/{name}.json",
    "@xzero-ui-pro": "https://mcp.xzero.co.uk/r/pro/{name}.json"
  }
}
npx shadcn@4.23.0 add @xzero-ui/timeline

Install xzero-foundation once, and import @/components/xzero/foundation.css in your app root. No Xzero token is used by this snapshot. For sample portraits, photos, fonts, or logos, download https://mcp.xzero.co.uk/install-assets.mjs and run node xzero-install-assets.mjs <receiving-project>.

Usage

import { Timeline } from "@/components/xzero/timeline/timeline";

const events = [
  { id: "e1", at: "2026-09-22T09:12:00Z", actor: "Maya", title: "merged Checkout redesign into main", meta: "PR #482" },
  { id: "e2", at: "2026-09-22T08:40:00Z", title: "Deploy failed", tone: "danger" as const, detail: <pre>Build step exited 1</pre> },
];

export function Activity({ now }: { now: number }) {
  return <Timeline events={events} now={now} label="Project activity" maxHeight={420} />;
}

API reference

Timeline

A vertical activity feed grouped by day with pinned day labels and rows that expand in place.

PropTypeDefaultDescription
events (required){ id: string; at: string | number; actor?: string; title: string; meta?: string; detail?: ReactNode; avatar?: string; icon?: ReactNode; tone?: "neutral" | "success" | "danger" }[]–Updates in any order; newest shows first. Rows with detail are expandable.
now (required)number–Reference time in epoch ms for relative labels and day groups. Pass a ticking clock to keep labels fresh.
label (required)string–Accessible name for the feed.
timeZonestring"UTC"Time zone for day groups and clock times.
localestring"en-US"Formatting locale.
maxHeightnumber | string–Height of the scrolling area. Without it the feed grows with the page.
scrollToNewbooleantrueScrolls back to the top when a new update arrives.
defaultExpandedstring[][]Event ids expanded on mount.
headingLevel2 | 3 | 4 | 5 | 63Heading level for day labels.
classNamestring–Class for the root.

Keyboard interactions

KeysAction
ArrowDown / ArrowUpMoves between expandable rows.
Home / EndJumps to the first or last expandable row.
Enter / SpaceExpands or collapses the focused row.

Accessibility

Motion

Responsive behavior

Performance

Notes for AI

Also in activity

Guidance for AI tools

Timeline: Follow what happened, newest first, grouped by day. Follow the declared prop types and do not invent props. Keep keyboard access, reduced motion support, and both light and dark themes intact when adapting it.

Full library index: https://ui.xzero.co.uk/llms.txt

Browse all components