ResourceTimeline
Bars on a shared calendar: who or what is busy when. Overlapping bars on one row are detected and marked as conflicts.
Signature
Density
Viewport
Theme and light/dark are set in the top barWhen to use
Bars on a shared calendar: who or what is busy when.
Accessibility
Fully keyboard operable: Tab to focus, Enter/Space to activate. The visible focus ring uses --focus-ring — never remove it. Provide an accessible label (aria-label) for icon-only controls.
Install and import
npx shadcn@latest add @prism/resource-timeline
import { ResourceTimeline } from '@/components/prism/ResourceTimeline';
In a no-build prototype, read it from the bundle instead: const { ResourceTimeline } = window.PrismDesignSystem_39d121;
Props
| Prop | Type | Required | Description |
|---|---|---|---|
rows | TimelineRow[] | — | |
start | number | Yes | Shared domain — every row and tick is positioned from these. |
end | number | Yes | |
ticks | TimelineTick[] | — | |
today | number | — | Draws a now-line when inside the domain. |
rowHeight | number | — | |
labelWidth | number | — | |
onBarClick | (bar: TimelineBar, row: TimelineRow) => void | — | |
formatBar | (bar: TimelineBar, row: TimelineRow) => React.ReactNode | — | |
className | string | — |