Prodular UI

Time track

Pro

A time axis with swimlanes, point and span events, a playhead, zoom, pan and range selection, for incident reviews, signal timelines and playback.

npx prodular-ui add time-track

Part of Prodular UI Pro. Preview and read the docs freely, install with a license. See pricing

Incident review

Deploys, alerts and on-call actions on three lanes. Play moves the playhead; Shift and drag selects the window to report on.

CriticalHighRoutine
Deploys
Alerts
On-call

Ctrl or Cmd and scroll to zoom, Shift and scroll or drag to pan, Shift and drag to select a range. Focus the playhead and use the arrow keys.

Anatomy

<TimeTrack aria-label="Incident" domain={[start, end]} time={time} onTimeChange={setTime}>  <TimeTrackAxis />  <TimeTrackLanes>    <TimeTrackLane label="Alerts">      <TimeTrackEvent at={t} label="Error rate above 2%" color="severity-high" />    </TimeTrackLane>  </TimeTrackLanes></TimeTrack>

Guidance

Use it when

  • Events that happen at a time across a few sources: deploys, alerts, sensor readings, messages.
  • A playhead when the rest of the screen shows the state at one moment.
  • Range selection to filter other panels to a window.

Avoid

  • The activity feed of a record. That is Timeline.
  • More than about ten lanes. Group sources or let people pick lanes.
  • Color as the only difference between events. Use labels, lanes and a Legend with shapes.

Rules for AI agents

Published in llms-full.txt, the registry and the MCP server, so coding agents follow them when they build with this component.

  • Pass times as numbers in milliseconds (Date.getTime()).
  • Give every TimeTrackEvent a label. It names the event for screen readers and shows on hover.
  • Color events with tokens, for example color="chart-2" or color="severity-high". Never raw colors.
  • Control view, time and range when other panels depend on them; leave them uncontrolled otherwise.
  • Do not hijack plain scrolling. Zoom stays on Ctrl or Cmd and the wheel, which is how TimeTrack works.
  • Put a Legend next to the track when colors or shapes carry meaning.
  • Pass timeZone="UTC" (or the zone your data is in) when labels must match logs or render on the server; otherwise labels use the viewer's zone and render after hydration.

API

TimeTrack

PropTypeDefaultDescription
domain[number, number]The full time extent in ms. The view never leaves it.
view[number, number]The visible window. Controlled with onViewChange, or defaultView.
timenumber | nullPlayhead position. Controlled with onTimeChange, or defaultTime.
range[number, number] | nullSelected range. Controlled with onRangeChange, or defaultRange.
minSpannumber10000Shortest span the view zooms to, in ms.
labelWidthstring"7rem"Width of the lane label column.
timeZonestringIANA zone for labels, such as "UTC". Without it labels use the viewer's zone and appear after hydration.

TimeTrackLanes

PropTypeDefaultDescription
nownumberDraws a dashed now line.

TimeTrackEvent

PropTypeDefaultDescription
atnumberStart time. Add end for a span.
colorstring"chart-1"A token name.

Installation

The Prodular UI CLI adds the source to components/ui with everything it depends on. In a project that already uses shadcn/ui, the shadcn CLI installs it from the Prodular registry too. See Installation for the first setup.

npx prodular-ui add time-track# or, with the registry in components.jsonnpx shadcn@latest add @prodular/time-track