Timeline

Virtualized timeline with time-scale bars, dependency paths, and snapped drag edits.

Also known as: gantt, schedule, bar timeline

Installation

Install with the CLI, or copy the component source into your project.

Add timeline (npm)

npx --yes -p github:itsvigneshv/default-file-ui#main df-ui add timeline

Properties

Virtualized timeline with shared row scroll, time-scale bars, dependency routing, and snapped drag edits. Requires @tanstack/react-virtual.

Timeline

PropTypeDefaultNotes
rowsTimelineRow[]-Row models with id and label (required).
visibleRangeTimelineVisibleRange-Inclusive ISO date range for the scale ({ start, end }) (required).
dependenciesTimelineDependencyEdge[][]Directed edges between row ids ({ fromId, toId }) drawn as dependency paths.
zoom"day" | "week" | "month" | "quarter""day"Fine tick unit for the time scale.
loadingbooleanfalseShow placeholder rows and set aria-busy.
emptyContentReactNode-Content when there are no rows and loading is false.
overscannumber6Extra virtual rows rendered outside the viewport.
estimateRowSizenumber-Estimated row height in pixels for virtualization. Defaults to the kit row height token.
onBarChange(id: string, next: TimelineBarChange) => void-Called when a bar finishes a pointer or keyboard edit with ISO start and due.
onRowClick(id: string) => void-Called when a row is activated.
renderRowMeta(row: TimelineRow) => ReactNode-Optional trailing content in the row label column.
aria-labelstring-Accessible name for the treegrid. Defaults to the kit string catalogue. Override when the host supplies a visible heading.
classNamestring-Additional styles on the root.

TimelineRow

PropTypeDefaultNotes
idstring-Stable row id (required).
labelReactNode-Label column content (required). Prefer a string so the bar cell can reuse it as part of its accessible name.
startstring-ISO start date for the bar.
duestring-ISO due date for the bar.
progressnumber-Optional completion fraction for the bar fill.
colorTokenstring-CSS custom property name used as the bar fill, for example --success.

Accessibility

Treegrid name: Pass aria-label when a visible title is not enough; otherwise the catalogue default names the grid. Row labels: Prefer string labels so gridcells can announce the item. Non-string labels fall back to a catalogue item name. Live region: Drag and keyboard edits announce the new date range.