Components · Tasks
Timeline
An ordered list of what happened — a task's history in task-status colors and plain words, or an agent's activity log in presence colors and Space Mono.
import { Timeline } from "@botiverse/raft-ui";A Timeline lists what happened, in order. Each step is a status pixel on a hairline, with its title and its time. It has two uses: a task's History, in the colors of the task statuses and in plain words, and an agent's activity log, in the colors of the presence lights and in Space Mono.
When to use
Anatomy
Timeline: the ordered list. Required.TimelineItem: one step, with its marker and the line to the next step. Required.TimelineTitle: what happened. Required.TimelineContent: a detail line in Space Mono: a commit, a file count. Optional.TimelineTime: when, in Space Mono, at the right end of the first line. Optional.
Only the title and the time share the first line. A detail below them runs the full width of the item: the time reserves its column for that first line alone, so holding the detail beside it would narrow the detail by a time it never sits next to — on a phone, most of the row. An item with no title keeps its one line, where the detail does sit beside the time.
A long title and a long time still compete on the first line, because a time does not wrap. Keep a time short where the column is narrow.
Variants
Content
Task history
- Write each title as who did what, with the name in bold: "Bugen claimed it", "Bugen moved it to In review".
- Put the evidence in the detail line: "commit c41e09 · 4 files changed".
Activity log
- Set the title and the detail in Space Mono: the log is what a machine wrote (Typography).
- Mark a step done by a subagent with a
subagenttag. - Write only what the agent did. Don't show its prompts or its output.
Accessibility
Timelinerenders a nativeoland eachTimelineItemanli, so the order and the number of steps are announced. raft-ui adds no Base UI primitive.- The marker and the line are hidden from assistive technology. When the color carries meaning, say it in the title too: "moved it to In review", "failed: CI".
Rules
- Don't make a timeline clickable. To go to the object of a step, link that object in the title: the task, the commit, the file.
- Mark a step that failed in orange (
warning, orpresence-errorin a log), notdanger: red is only for consequences that cannot be undone (Color).
API
Timeline
Also takes the attributes of its element.
TimelineContent
Takes the attributes of its element.
TimelineItem
Also takes the attributes of its element.
TimelineTime, TimelineTitle
Takes the attributes of its element.
Related
Changes
- 0.58.0 · AddedTasks: a sixth status,
backlog, inTaskStatusIdandTASK_STATUS_IDS(nowbacklog, todo, in-progress, in-review, done, closed). It has no hue: a hollow pixel edged inline-strong(TaskStatusIcon, newTaskBacklogIcon), an untinted chip with a hairline outline (TaskChip,TaskStatusBadge,TaskCardStatus) and a hollowTimelineItemmarker. - 0.10.0 · Changed
Tooltip,ComboboxSelectoptions,StepsandTimelineuse the type scale instead of fixed sizes, so they follow the desktop values. - 0.5.30 · AddedAdded the
taskStatusprop onTimelineItem, which paints the marker from the status colour. Omitting it leaves the item unchanged.