Timeline

Preview

Install

Add it with the shadcn CLI, or copy the source manually.

$ bunx --bun shadcn add @beui/timeline

API Reference

events
TimelineEvent[]
Default—
value?
string

Focused event id (controlled).

Default—
defaultValue?
string

Initially focused event id (uncontrolled). Defaults to the first event.

Default—
onValueChange?
((id: string) => void)
Default—
itemWidth?
number

Card width in px at full size. Shrinks to fit narrow containers.

Default340
height?
number

Stage height in px.

Default600
years?
boolean

Large year numerals drifting behind the cards.

Defaulttrue
ruler?
boolean

A group of ticks in each gap between cards.

Defaulttrue
cables?
boolean

Lines fanning from the top and bottom center to the cards near the center.

Defaulttrue
formatDate?
((date: Date) => string)
Default—
formatYear?
((date: Date) => string)
Default—
aria-label?
string
Default—
labels?
Partial<{ label: string; hint: string; }>

Override any built-in string.

Default—
className?
string
Default—

Updated