Examples
Activity history
Order events from oldest to newest and make each event readable without color.
Workspace created
The initial team workspace is ready.Status: successMembers invited
Three teammates received an invitation.Status: currentFirst review
The team can add a note before the review.Status: default
Workspace activity timeline
import { Timeline } from "@phuctech/ui/components/timeline";
const items = [
{ id: "created", title: "Workspace created", date: "Sep 18", dateTime: "2026-09-18", description: "The initial team workspace is ready.", status: "success" as const },
{ id: "invited", title: "Members invited", date: "Sep 20", dateTime: "2026-09-20", description: "Three teammates received an invitation.", status: "current" as const },
{ id: "review", title: "First review", date: "Upcoming", description: "The team can add a note before the review." },
];
export function Example() {
return <Timeline label="Workspace activity" items={items} />;
}
Status markers
Pair status color with a text label and event meaning.
- Status: success
Payment captured
- Status: current
Invoice review
- Status: warning
Address needs review
- Status: error
Delivery attempt failed
Timeline status states
import { Timeline } from "@phuctech/ui/components/timeline";
const items = [{ id: "complete", title: "Payment captured", status: "success" as const }, { id: "pending", title: "Invoice review", status: "current" as const }, { id: "attention", title: "Address needs review", status: "warning" as const }, { id: "failed", title: "Delivery attempt failed", status: "error" as const }];
export function Example() {
return <Timeline label="Order processing status" items={items} />;
}
Long descriptions
Long content wraps in the event column without covering the timeline rail.
Access review completed
The security team reviewed access for all workspace members, confirmed role assignments against the current policy, and recorded follow-up for the next quarterly review. This long copy stays within the content column.Status: success
Timeline with long event content
import { Timeline } from "@phuctech/ui/components/timeline";
const items = [{ id: "audit", title: "Access review completed", date: "Today", description: "The security team reviewed access for all workspace members, confirmed the role assignments against the current policy, and recorded the follow-up needed for the next quarterly review. This longer description wraps inside the content column without covering the date or the timeline rail.", status: "success" as const }, { id: "next", title: "Next review", date: "Next quarter", description: "A future check remains visible below the current event." }];
export function Example() {
return <Timeline label="Access review history" items={items} />;
}
Try the timeline
Inspect a concise request history.
- Status: success
Draft saved
- Status: current
Waiting for approval
Timeline property playground
import { Timeline } from "@phuctech/ui/components/timeline";
const items = [{ id: "draft", title: "Draft saved", date: "10:12 AM", status: "success" as const }, { id: "approval", title: "Waiting for approval", date: "10:14 AM", status: "current" as const }];
export function Example() {
return <Timeline label="Request activity" items={items} />;
}
Usage
import { Timeline } from "@phuctech/ui/components/timeline";
<Timeline label="Workspace activity" items={events} />Timeline renders an ordered vertical list. Event order is exactly the order provided by the feature; date sorting, timezone interpretation, and live updates remain feature-owned.
API
Accessibility
Timeline uses a native ordered list, headings, text descriptions, machine-readable times when supplied, and a visually hidden status label. Long descriptions wrap in the event column and the rail is decorative.