An agent's plan, step by step: each step with whether it is to do, under way or done, under one line that counts them, "Plan · 2 of 5". It is open while any step is left, and folds to that line once every step is done; once the person opens or closes it, their choice holds. Each step's status is said in words to a screen reader, not only by its icon. It is built on Collapsible.
Install
Add TodoList from Ouro UI to this app. Read https:// ui.ouroboros.bot/ docs/ todo-list.md first and follow it.Or by hand. Once per app, with Tailwind CSS v4 and an @/* path alias (Ouro HX is built on Base UI, so --base base; skip -t in an existing app):
npx shadcn@latest init --base base --preset nova --yes --no-monoreponpx shadcn@latest add ourostack/ouro-ui/ouro-base#v1.3.823Then the component (Installing):
npx shadcn@latest add ourostack/ouro-ui/todo-list#v1.3.823Or, with the @ouro namespace set up:
npx shadcn@latest add @ouro/ouro-base @ouro/todo-listIts tests, stories and Playwright spec are optional. They need Vitest 4.1.11 or later, and from v0.8.0 never change a version your app has (Testing):
npx shadcn@latest add ourostack/ouro-ui/todo-list#v1.3.823 ourostack/ouro-ui/todo-list-tests#v1.3.823import { TodoList } from "@/components/ouro/todo-list/todo-list";Paths use shadcn's default @/ alias; the CLI rewrites them to yours.
Example
<TodoList items={[
{ id: "1", title: "Read the recipes", status: "done" },
{ id: "2", title: "Build the grocery list", status: "in_progress" },
{ id: "3", title: "Book the delivery", status: "pending" },
]} />Usage
Its agent side, todoListAx in todo-list-styles.ts, lets an agent read the plan. It offers no action: the agent writes its plan through its own runtime.
Use instead when
- Use
Checklistinstead for a list the person ticks off themselves, andToolCallGroupfor the calls an agent made.
Props
Type: TodoListProps.
className- Type:
string - Layout only: margins, width (
mt-2). Appearance classes warn in development. defaultOpen- Type:
boolean - Opens it first and keeps it open after every step is done, until the person closes it.
items(required)- Type:
readonly TodoItem[] - The agent's steps, in its order. With none, TodoList renders nothing.
label- Type:
string - Default:
"Plan" - The title's first word, before the count: "Plan · 2 of 5".
onOpenChange- Type:
((open: boolean) => void) - Called with the new state when the person opens or closes it.
open- Type:
boolean - Whether it is open, when you control it. Pair it with
onOpenChange. ref- Type:
Ref<HTMLDivElement> - Reaches the rendered element.
Don't use
These are not props. Passing one fails the type check with the fix in the error, and in development a console message names the fix.
tasks: Not a prop. The steps areitems:<TodoList items={[{ id, title, status }]}>.title: Not a prop. The title's word islabel:<TodoList label="Plan">.todos: Not a prop. The steps areitems:<TodoList items={[{ id, title, status }]}>.
className is for layout only
Pass margins, width and grid placement (mt-4, w-full, col-span-2).
Appearance comes from props, not classes. In development, a class that sets appearance logs one warning per component instance, naming the prop to use instead. A class sets appearance when, after its variants (hover:, sm:) and any ! are removed, it starts with bg-, text-, border-, rounded-, shadow-, font-, ring-, from-, via-, to-, fill- or stroke-, or is border, rounded, shadow or ring, or has a dark: variant. Text wrapping, overflow and table layout classes (text-wrap, text-ellipsis, border-collapse) are layout and do not warn.
Alignment classes (text-center) warn too: set alignment on a parent element.
Types
TodoItem
One step of an agent's plan.
interface TodoItem {
/** Your app's id for the step. */
id: string;
/** What the step is, as the agent wrote it: "Read the recipes". */
title: string;
/** Where it stands: `pending` (to do), `in_progress` (doing now) or `done`. */
status: TodoStatus | (string & { 'Use "pending", "in_progress" or "done"': never });
}
