All components (283)
Resource timeline
Dates and time · ResourceTimeline
What it is and when to use it
A schedule by resources: one row per person or room and one bar per booking, over a line of days. Two overlapping bars go in different lanes, so the overlap can be seen.
When to use it
- Room occupancy, team shifts, workshop machines.
resourcesare the rows andeventsthe bars, with the last day included.startanddayssay what is shown.onEventPressturns each bar into a button.
When not to
- An agenda by hours:
WeekAgenda. - Project milestones in order:
Timeline.
Keyboard: Tab reaches the box, which scrolls with the arrows, and each bar if it is a button.
Accessibility: it is a list of resources with the list of their bars, and each bar says its title and its full dates. A bar continuing before what is shown has a dashed edge, and one continuing after has a straight one.
Fine-tuning: --amset-timeline-name is the width of the names, --amset-timeline-day the minimum of a day and --amset-timeline-lane-height the height of a lane.
What it looks like
March occupancy
2 to 15 March · 4 resources
- Workshop
- Meeting room
- Marta Ruiz
- José Ortega
<Card
title="March occupancy"
subtitle="2 to 15 March · 4 resources"
>
<SegmentedGroup label="Show" size="sm" value={grupo} onChange={setGrupo} options={grupos} />
<ResourceTimeline
label="March occupancy"
resources={[{ key: "r1", label: "Workshop" }, { key: "marta", label: "Marta Ruiz" }]}
events={[
{ key: "1", resource: "r1", title: "Aurelia order", start: "2026-03-02", end: "2026-03-06" },
{ key: "4", resource: "marta", title: "Holidays", start: "2026-02-24", end: "2026-03-04", tone: "success" },
]}
start="2026-03-02"
days={14}
/>
</Card>Props
Import it with import { ResourceTimeline } from '@amset/ui'. Required props are marked.
| Prop | Type | What it does |
|---|---|---|
eventsrequired | readonly TimelineEvent[] | The bars: `{ key, resource, title, start, end, tone? }`, with the last day included. |
labelrequired | string | What is being shown: "Room bookings". Required. |
resourcesrequired | readonly TimelineResource[] | The rows: people, rooms, machines. |
startrequired | string | The first day shown, `YYYY-MM-DD`. |
className | string | Merged with the library classes; it does not replace them. |
days | number | How many days are shown. By default, 14. |
error | ReactNode | The data has not arrived: it says so in the place of the drawing, with what is passed here. |
loading | boolean | The data is on its way. |
onEventPress | (key: string) => void | Turns each bar into a button and hands over its key. |
It also accepts the attributes of the element it renders: className, style, data-*, aria-* and its events.
In the test bench
Every state and variant, to try one at a time, on its page at storybook.amsetui.com:
