Todo List

Shows an agent's step-by-step plan and its progress.

  • Find free weekends in November, In progress
  • Compare flights TPE → KIX, Pending
  • Check ryokan availability near Gion, Pending
  • Draft a two-day itinerary, Pending

Installation

pnpm dlx shadcn@latest add @paneui/todo-list

Usage

Examples

Statuses

Collapsed

Collapse on Complete

Use when a finished plan should get out of the way of the reply.

Max Height

Use for long plans inside a fixed-height panel.

Status Mark

Use the mark alone in your own step lists.

Accessibility

The in-progress item has aria-current="step", every title ends with a screen-reader-only status, and the header reads "N of M done".

Motion

Under reduced motion the in-progress arc pulses instead of spinning, checks and crosses appear without drawing, and rows don't animate their position.

API Reference

Built on the Collapsible primitive. Only the props this library adds or changes are listed; everything else passes through.

TodoList

Collapsible agent task plan with a live completion count; failures are counted in the header. Also accepts every prop of Collapsible.Root.

items*
TodoItem[]
Plan items in order.
title= "Plan"
ReactNode
Header label.
open
boolean
Controlled open state.
defaultOpen= true
boolean
Initial open state when uncontrolled.
onOpenChange
(open: boolean) => void
Called when the plan opens or closes.
collapseOnComplete= false
boolean
Fold the plan away 700ms after every item is done.
maxHeight
number
Cap the list height in px; it scrolls past this.
PropTypeDefaultDescription
items*TodoItem[]—Plan items in order.
titleReactNode"Plan"Header label.
openboolean—Controlled open state.
defaultOpenbooleantrueInitial open state when uncontrolled.
onOpenChange(open: boolean) => void—Called when the plan opens or closes.
collapseOnCompletebooleanfalseFold the plan away 700ms after every item is done.
maxHeightnumber—Cap the list height in px; it scrolls past this.
data-complete
On the root once every item is done.
data-status
On each item: its status.
Data attributeDescription
data-completeOn the root once every item is done.
data-statusOn each item: its status.

TodoItem

Shape of one plan item.

id*
string
Stable key.
title*
ReactNode
What the step does.
status= "pending"
"pending" | "in-progress" | "done" | "failed"
Step state.
meta
ReactNode
Trailing note, such as a duration, count or failure reason.
detail
ReactNode
Second line under the title.
PropTypeDefaultDescription
id*string—Stable key.
title*ReactNode—What the step does.
status"pending" | "in-progress" | "done" | "failed""pending"Step state.
metaReactNode—Trailing note, such as a duration, count or failure reason.
detailReactNode—Second line under the title.

TodoStatusMark

The morphing 20px status glyph.

status*
"pending" | "in-progress" | "done" | "failed"
State to draw.
className
string
Merged onto the SVG.
PropTypeDefaultDescription
status*"pending" | "in-progress" | "done" | "failed"—State to draw.
classNamestring—Merged onto the SVG.