Data display
Timeline
Free18.1 KB gzippedA vertical or horizontal sequence of events or steps, rendered as an ordered list. Items show a marker on a connector line plus a title, time, meta, and description. Use status for progress tracking (complete, current, upcoming, error): each status has its own marker shape and hidden status text, so it never relies on color alone.
Accessibility: WCAG 2.2 AA · No A or AA violations in light or dark mode · No keyboard interaction of its own · Full report
Import
import { Timeline } from "@vjdesigns/vjdesigns-ui";
Importing only Timeline adds about 18.1 KB of minified, gzipped JavaScript to your app (React not included). The stylesheet is shared by every component and loaded once: 75.1 KB gzipped.
Examples
Order tracking
status marks progress with a shape and a screen-reader label, not just color.
- Completed:Order placed
- Completed:ShippedUPS · 1Z999AA10123456784
- Current step:Out for deliveryArriving by 8 PM today.
- Upcoming:Delivered
import { Timeline } from "@vjdesigns/vjdesigns-ui";
export function OrderTracking() {
return (
<Timeline style={{ width: "100%", maxWidth: "28rem" }}>
<Timeline.Item status="complete" title="Order placed" time="Oct 10, 9:24 AM" dateTime="2026-10-10T09:24" />
<Timeline.Item status="complete" title="Shipped" description="UPS · 1Z999AA10123456784" time="Oct 11" dateTime="2026-10-11" />
<Timeline.Item status="current" title="Out for delivery" description="Arriving by 8 PM today." time="Oct 14" dateTime="2026-10-14" />
<Timeline.Item status="upcoming" title="Delivered" />
</Timeline>
);
}
Alternating
card puts each item's content on a surface; align="alternate" zigzags items on wide screens.
- KickoffGoals and scope agreed.
- BetaShared with 200 testers.
- LaunchLive for everyone.
import { Timeline } from "@vjdesigns/vjdesigns-ui";
export function Alternating() {
return (
<Timeline align="alternate" style={{ width: "100%" }}>
<Timeline.Item card title="Kickoff" description="Goals and scope agreed." time="Jan" />
<Timeline.Item card title="Beta" description="Shared with 200 testers." time="Mar" tone="accent" />
<Timeline.Item card title="Launch" description="Live for everyone." time="May" tone="success" />
</Timeline>
);
}
Accessibility
Each item's status is announced ("Completed", "Current step", "Error") and shown by the marker's shape as well as its color. statusLabel rewords one item's status, and time with dateTime renders a machine-readable <time>.
- Completed:Order placed
- Needs your attention:Payment declinedUpdate your card to continue.
- Upcoming:Shipping
import { Timeline } from "@vjdesigns/vjdesigns-ui";
export function Accessibility() {
return (
<Timeline style={{ width: "100%", maxWidth: "28rem" }}>
<Timeline.Item status="complete" title="Order placed" time="Oct 10" dateTime="2026-10-10" />
<Timeline.Item status="error" statusLabel="Needs your attention" title="Payment declined" description="Update your card to continue." time="Oct 11" dateTime="2026-10-11" />
<Timeline.Item status="upcoming" title="Shipping" />
</Timeline>
);
}
Translated
The status words read by screen readers come from the locale (French here). Titles and dates are your own text.
- Terminé:Commande passée
- Étape en cours:En cours de livraison
- À venir:Livrée
import { Timeline, LocaleProvider } from "@vjdesigns/vjdesigns-ui";
import fr from "@vjdesigns/vjdesigns-ui/locales/fr";
export function Translated() {
return (
<LocaleProvider locale="fr" messages={fr}>
<Timeline style={{ width: "100%", maxWidth: "28rem" }}>
<Timeline.Item status="complete" title="Commande passée" time="10 oct." dateTime="2026-10-10" />
<Timeline.Item status="current" title="En cours de livraison" time="14 oct." dateTime="2026-10-14" />
<Timeline.Item status="upcoming" title="Livrée" />
</Timeline>
</LocaleProvider>
);
}
Right to left
The first example again, inside a right-to-left LocaleProvider (Arabic). Layout, spacing and arrow icons mirror, and the components' built-in text is translated. The example's own text stays in English.
Order tracking
- مكتمل:Order placed
- مكتمل:ShippedUPS · 1Z999AA10123456784
- الخطوة الحالية:Out for deliveryArriving by 8 PM today.
- قادم:Delivered
import { LocaleProvider } from "@vjdesigns/vjdesigns-ui";
import ar from "@vjdesigns/vjdesigns-ui/locales/ar";
// OrderTracking is the "Order tracking" example above.
<LocaleProvider locale="ar" messages={ar}>
<OrderTracking />
</LocaleProvider>
API reference
Timeline
| Prop | Type | Default |
|---|---|---|
orientationDirection of the line. Use | "horizontal""vertical" | "vertical" |
alignWhich side of the line the content sits on. | "start""alternate""end" | "start" |
sizeMarker size, spacing, and type size. | "sm""md""lg" | "md" |
variantConnector line style. | "solid""dashed" | "solid" |
statusLabelsOverrides the screen-reader text for statuses ("Completed", "Current step", "Upcoming", "Error"). | TimelineStatusLabels | — |
scrollLabelAccessible name for the horizontal scroll region, used only when a horizontal timeline overflows and becomes focusable. Falls back to | string | — |
children
| ReactNode | — |
Also accepts native <ol> attributes, plus className, style and ref.
Timeline.Item
One event or step on the timeline.
| Prop | Type | Default |
|---|---|---|
titleItem heading, in bold display type. | ReactNode | — |
descriptionSupporting text under the title. | ReactNode | — |
timeWhen it happened, e.g. "Oct 12" or "2h ago". Rendered in a | ReactNode | — |
dateTimeMachine-readable date for | string | — |
metaExtra muted detail next to the time (e.g. a location or author). | ReactNode | — |
iconIcon shown in a tone-tinted circle instead of the dot. Decorative: the title must carry the meaning. Overrides the status marker shape (the status is still announced), so prefer it for items without a status. | ReactNode | — |
markerFully custom marker, such as an | ReactNode | — |
toneColor of the marker and the connector segment after it. | "neutral""primary""accent""success""warning""danger""info" | "danger" when `status="error"`, otherwise "primary" |
statusProgress status. | "complete""current""upcoming""error" | — |
statusLabelOverrides the screen-reader status text for this item. | string | — |
cardRender the content inside a rounded outline card (for activity feeds). | boolean | false |
childrenExtra content below the description (links, badges, a stat line). | ReactNode | — |
Also accepts native <li> attributes, plus className, style and ref.
See what changed in each version in the Changelog.
Accessibility report
Timeline targets WCAG 2.2 AA. Below: a live axe-core audit of this page's examples, Lighthouse scores for the page in both modes, the accessibility behavior built into the component, and the checks only a person can do.
axe-core audit (live)
Checking the examples above…
Lighthouse audit
Light mode
Score 10035 passed · 0 failed · 30 not applicable · 10 to check by hand
Dark mode
Score 10035 passed · 0 failed · 30 not applicable · 10 to check by hand
Lighthouse 13.5.0 audits the whole docs page (header and sidebar included), not just the examples, in English. Last run 11/27/2026. Some failed audits carry no weight in the score, so a page can score 100 and still list one.
Built-in behavior
Keyboard
Not focusable, so there's no keyboard interaction of its own.
Roles and states
| Element | Role | States and properties |
|---|---|---|
| Timeline | list | — |
| Item | listitem | aria-current="step" on the current item |
Manual checks
Automated tools find roughly a third of accessibility issues. Test these in your app, with your content.
| Check | What to test | WCAG 2.2 |
|---|---|---|
| Keyboard | Every action works with Tab, Shift+Tab, Enter, Space and the arrow keys, and focus never gets stuck. | 2.1.1 (A), 2.1.2 (A) |
| Focus | Focus moves in a logical order, is always visible, and isn't hidden behind sticky headers. | 2.4.3 (A), 2.4.7 (AA), 2.4.11 (AA), 2.4.13 (AAA) |
| Screen readers | Names, roles and states are announced correctly, and status changes are announced without moving focus. | 1.3.1 (A), 4.1.2 (A), 4.1.3 (AA) |
| Color | Meaning never depends on color alone; your own colors meet contrast in both modes. | 1.4.1 (A), 1.4.3 (AA), 1.4.11 (AA), 1.4.6 (AAA) |
| Zoom and reflow | At 200% text size and at 320px wide (400% zoom), nothing is cut off and no sideways scrolling is needed. | 1.4.4 (AA), 1.4.10 (AA), 1.4.12 (AA) |
| Pointer targets | Click and tap targets are at least 24×24px (44×44px for AAA), or spaced so they don't overlap. | 2.5.8 (AA), 2.5.5 (AAA) |
| Motion | Animations respect the reduced-motion setting. | 2.3.3 (AAA) |