Installation
Usage
import { PlanTimeline } from "@/components/plan-timeline"
export function AgentPlan() {
return (
<PlanTimeline
steps={[
{ id: "search", title: "Find places nearby", status: "done", meta: "1.4s · 5 results" },
{ id: "ask", title: "Ask before emailing", status: "waiting", meta: "needs you" },
{ id: "send", title: "Send the invite", status: "pending" },
]}
/>
)
}Props
| Prop | Type | Default | Description |
|---|---|---|---|
| steps | { id: string; title: ReactNode; status: "pending" | "active" | "waiting" | "done" | "failed"; meta?: ReactNode }[] | — | The plan, in order. |
| ...props | HTMLAttributes<HTMLOListElement> | — | Any ol attribute. |
Accessibility
- An ordered list; the current step carries aria-current="step".
- Every status is spoken as text, not only shown as colour.
- With prefers-reduced-motion the pulse and the fill don't move.
Changelog
- v1.0.1Latest
Fix: the "needs you" step text now meets 4.5:1 contrast in light and dark themes.