Data display
Timeline
Compound component: `Timeline` and `Timeline.Item`.
Import
import { Timeline } from '@the_viveksingh/vivek-ui'Vertical timeline
An ordered list, because the order is the meaning. status drives the marker and adds a visually hidden label, so "current" is not conveyed by colour alone.
Pull request opened
Completedfeat: forms milestone, 9 components and useControllableState.
Review requested
CompletedTwo approvals needed before merge.
Checks running
In progresstypecheck, lint, test, build, size-limit.
Merge to main
Not started
<Timeline>
<Timeline.Item
title="Pull request opened"
description="feat: forms milestone."
timestamp="2 days ago"
status="complete"
/>
<Timeline.Item title="Checks running" timestamp="Just now" status="current" />
<Timeline.Item title="Merge to main" timestamp="Pending" status="pending" />
</Timeline>Horizontal
For a short, fixed set of stages - an order tracker rather than a history.
Ordered
CompletedPacked
CompletedShipped
In progressDelivered
Not started
<Timeline orientation="horizontal">
<Timeline.Item title="Ordered" status="complete" timestamp="Mon" />
<Timeline.Item title="Shipped" status="current" timestamp="Wed" />
<Timeline.Item title="Delivered" status="pending" timestamp="Fri" />
</Timeline>Props
Generated from the package's own type declarations, so this table cannot drift from the code.
| Prop | Type | Default | Description |
|---|---|---|---|
orientation | TimelineOrientation | — | — |
align | TimelineAlign | — | `start` (default) keeps every entry on one side of the rail. `alternate` zig-zags them, and falls back to `start` on a container too narrow to hold two columns — so it is safe to set unconditionally. |
Every remaining prop is spread onto the root element, so all standard HTML and ARIA attributes work. className and style are merged with the library's own, never replaced, and the ref forwards to the root DOM node.
Rendering
Timeline carries no 'use client' directive and renders directly in a React Server Component. No client JavaScript is shipped for it.