Skip to Content
DocsEnterpriseBlogShowcase

Timeline

Used to display a list of events in chronological order

SourceStorybookRecipe

Product Shipped

13th May 2021

We shipped your product via FedEx and it should arrive within 3-5 business days.

Order Confirmed

18th May 2021

Order Delivered

20th May 2021, 10:30am

Setup

If you don't already have the snippet, run the following command to add the timeline snippet

chakra snippet add timeline

The snippet includes a closed component composition for the Timeline component.

Usage

import { TimelineItem, TimelineRoot } from "@/components/ui/timeline"
<TimelineRoot>
  <TimelineItem />
  <TimelineItem />
</TimelineRoot>

Examples

Sizes

Use the size prop to change the size of the timeline.

S

sage

created a new project

sage

changed status from In progress to Completed
S

sage

created a new project

sage

changed status from In progress to Completed

Variants

Use the variant prop to change the variant of the timeline.

S

sage

created a new project

sage

changed status from In progress to Completed
S

sage

created a new project

sage

changed status from In progress to Completed
S

sage

created a new project

sage

changed status from In progress to Completed
S

sage

created a new project

sage

changed status from In progress to Completed

Content Before

Here's an example of a timeline with content before the timeline indicator.

Nov 1994
1
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Nov 2010
2
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Nov 1994
1
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Nov 2010
2
Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Alternating Content

Here's an example of a timeline with alternating content.

Placed Order
Prepared Order
Order Delivered

Props

Root

PropDefaultType
colorPalette 'gray'
'gray' | 'red' | 'orange' | 'yellow' | 'green' | 'teal' | 'blue' | 'cyan' | 'purple' | 'pink' | 'accent'

The color palette of the component

variant 'solid'
'subtle' | 'solid' | 'outline' | 'plain'

The variant of the component

size 'md'
'sm' | 'md'

The size of the component