caliper uidocs

Resource timeline

Pro

People, rooms or machines down the side and time across: bookings in lanes, double bookings flagged, drag to move, resize or create, Alt and the arrows to do the same from the keyboard, and day or week views.

Installs components/ui/resource-timeline.tsxDepends on @radix-ui/react-slot, lucide-reactMotion shared motion tokens
pnpm dlx shadcn@latest add @caliper/resource-timeline

Wednesday 14 October

1 double booking
Resource
Ana SousaElectrician
Rewire kitchen · Rua Nova 408:30–12:00
Socket check13:00–14:00
Ben OkaforPlumber
Boiler leak09:00–11:00
Bathroom fit10:30–16:00
Cai LindqvistElectrician
Office lighting11:00–17:00
Dee MarshApprentice
Shadow Ana08:30–12:00
Eli HaddadGas engineer
Annual service ×309:30–15:30

Drag to move or create. Focus a booking and press Alt with ← → to move it in time, ↑ ↓ to give it to someone else, Shift to change its length.

When to use #

Use it for

  • Rotas, room and equipment booking, field service dispatch.
  • Capacity planning by person.

Skip it when

  • One person’s week; use the calendar.

Installation #

terminal
pnpm dlx shadcn@latest add @caliper/resource-timeline

Adds its 5 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.

Usage #

Import it from your copy of the source. The example behind the preview comes with the source.

example.tsx
import { ResourceTimeline } from "@/components/ui/resource-timeline"

The worked example comes with Pro

The 45-line example behind the preview opens here with a Pro or Team licence.

Checking your licence…

API reference #

ResourceTimeline

component
PropTypeDefaultDescription
resources *readonly TimelineResource[]—
bookings *readonly TimelineBooking[]—
onBookingsChange *(bookings: TimelineBooking[]) => void—
date *string—Any day in the period shown, "2026-10-14".
onDateChange *(date: string) => void—
view"day" | "week"—
onViewChange((view: "day" | "week") => void)—
startHournumber7
endHournumber20
nowstring—Local date-time for the now line; defaults to the clock.
onCreate((resourceId: string, start: string, end: string) => TimelineBooking | null | undefined)—Called after an empty row is dragged across. Return the new booking, or nothing to cancel.
labelstring"Bookings"
classNamestring—

Accessibility #

It exposes status, grid, row, columnheader, rowheader and gridcell semantics, with aria-labelledby, aria-label, aria-hidden, aria-live and aria-describedby kept in step with state. Changes that matter are announced through a live region.

KeyBehaviour
↑Moves to the previous item or value.
↓Moves to the next item or value.
←Moves to the previous item or value.
→Moves to the next item or value.

Motion #

Transitions use the shared duration and easing tokens. Under prefers-reduced-motion those tokens collapse to instant and travel distances go to zero, so state changes still happen without movement.