Timeline
Events in order, vertical or horizontal, with indicators, dates and a completed state.
Project created
Repository initialised from the starter template.First deploy
Preview environment went live on the staging domain.Design review
Tokens and spacing approved by the design team.Public launch
Production release scheduled after QA sign-off.
Installation
pnpm dlx nachui add timelineAnatomy
Every item declares its
step. Items whose step is at or below the timeline value are completed: their indicator fills with the primary color and the separator leading out of them follows. The item at value also gets data-active, so you can style the current step on its own. The root renders an ordered list and each item a list item.Composition
Use the following composition to build a
Timeline:Variants
Horizontal
orientation="horizontal" lays the steps out left to right with the line above the content. Items share the width evenly.Ordered
Packed
Shipped
Delivered
Icons
Pass an icon as the indicator's children and size it with
className. Add padding to the item so the content clears the larger marker.Commit pushed
feat(ui): add a side-aware caret to the tooltipChecks passed
Lint, type-check and 312 tests in 48s.Merged into main
Squashed by lucia after one approval.Deployed
Waiting for the production rollout window.
Alternate
alternate mirrors every other item across the line, for roadmaps and history pages.Discovery
Interviews with twelve teams and a first prototype.Private beta
Fifty workspaces onboarded behind a feature flag.General availability
Self-serve signup, billing and the public docs.Integrations
Slack, Linear and GitHub apps in the marketplace.
Left-aligned dates
Push the item in with a margin and position the date in the gutter. The pieces are plain elements, so a couple of classes are enough.
Ticket opened
Customer reported a broken checkout on Safari.Assigned to Nico
Escalated to the payments squad.Fix deployed
Patched the Apple Pay session handshake.Resolved
Customer confirmed the order went through.
API Reference
Timeline
| Prop | Type | Default | Description |
|---|---|---|---|
value | number | 1 | Steps at or below this value are completed |
orientation | 'vertical' | 'horizontal' | 'vertical' | Layout direction |
alternate | boolean | false | Mirror every other item across the line (vertical) |
className | string | - | Additional CSS classes |
Timeline.Item
| Prop | Type | Default | Description |
|---|---|---|---|
step | number | - | Position of the item, compared against value |
className | string | - | Additional CSS classes |
Exposes
data-completed and data-active for styling.Timeline.Title
| Prop | Type | Default | Description |
|---|---|---|---|
as | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'h3' | Heading level |
className | string | - | Additional CSS classes |
Timeline.Date
Renders a
time element and accepts dateTime plus className.Timeline.Header, Timeline.Indicator, Timeline.Separator, Timeline.Content
Layout parts of an item. Each accepts
className and standard div props. The indicator takes children for a custom marker.Found something to improve?
Notice a bug, typo, or missing detail on this page? Help us make the documentation better by opening a GitHub issue.