Status Timeline

View as Markdown

The steps something goes through, with when each happened: an order, a deploy, an incident.

  1. Done: Ordered

  2. Done: Packed

    2 parcels from the Leeds warehouse
  3. Done: Shipped

  4. Now: Out for delivery

    Arriving between 13:00 and 15:00. Your driver is Sam.
  5. Next: Delivered

When to use

The steps something goes through, with when each happened: an order, a deploy, an incident. Use Activity Feed instead when you show everything that happened to a record, not its stages.

Usage

import { StatusTimeline } from "./ui/uicontext/components/StatusTimeline.ts"
export const Refund = <M>(h: Html.H<M>) =>	StatusTimeline(h, {		label: "Refund",		steps: [{ title: "Requested", state: "done", time: "2 Dec" }, { title: "Approved", state: "current", time: "Today" }, { title: "Paid back", state: "upcoming" }],	})

Examples

A deploy that failed

meta sits beside the time; dense tightens the steps for a side panel.

  1. Done: Build

    1m 48s
  2. Done: Tests

    3m 12s
  3. Done: Migrate database

    22s
  4. Failed: Health check

    30s
    GET /healthz returned 503 three times
  5. Next: Switch traffic

API reference

Options

StatusTimeline options
NameTypeDescription
labelrequiredstringWhat the steps are of: "Order 4417", "Deploy to production".
stepsrequiredTimelineStep<Message>[]—
densebooleanLess room between steps, for a side panel.
workingbooleanThe current step pulses while it's working; off for a step that's waiting on someone.
styleStyle—

Installation

pnpm dlx shadcn@latest add checkfu/uicontext/status-timeline

Source