Task Plan

The agent's plan as steps that tick off live, with the risky one flagged ahead.

PROGet Task Plan and 168 other Pro components with pro lifetime — Get Pro

Category
AI Agent
Access
Pro
Source
337 lines · one file
States
6 drawn

The decision inside it

It flags a step before it runs

A `note` such as "Needs approval" sits on a pending step, so the person knows the risky part is still ahead instead of meeting it as a surprise.

When to use it

Use Task Plan for an agent's or a job's steps that tick off: pending, running, done, failed and skipped, with notes and one level of substeps. It folds to the current step when collapsible is set.

Installation

How you get it

Paste this into Claude Code, Cursor, Codex or any coding agent. It installs the file and uses it as it is, instead of writing a new one.

Use Liro's Task Plan for this.
Install it: npx shadcn@latest add @liro/task-plan
(the @liro registry is set up in components.json, with LIRO_KEY in .env.local)
Import it from @/components/ui/task-plan.
Do not rewrite or restyle it. Pass my data through its props
and keep its built-in states.

For the full brief with every prop and the mistakes assistants usually make, use Copy prompt above. Pro components install through the @liro registry with your CLI token: see the Namespaced tab.

Usage

components/plan.tsx
import { TaskPlan, type PlanStep } from "@/components/ui/task-plan";

const steps: PlanStep[] = [
  { id: "read", title: "Read the contract", status: "done", duration: "4s" },
  { id: "check", title: "Check the signers", status: "running", detail: "2 of 3 signed" },
  { id: "remind", title: "Remind Vertically", status: "pending" },
];

export function Plan() {
  return <TaskPlan title="Plan" steps={steps} collapsible />;
}

API reference

“Copy prompt” above puts a full brief on your clipboard, install command, dependencies, props, and the mistakes an assistant usually makes with this component.

Props

Read from the component’s own TypeScript interface when the site is built, so this table cannot drift from the file you install.

TypeNotes
stepsPlanStep[] Yes–
titleReact.ReactNode | false NoThe heading. Pass `false` to hide the header row. Default "Plan".
collapsibleboolean NoLet the header fold the plan down to the step in progress.
defaultOpenboolean No–
openboolean No–
onOpenChange(open: boolean) => void No–
onStepClick(step: PlanStep) => void NoMakes each step a button — to scroll a thread to it, say.
denseboolean NoTighter rows, for a narrow side panel.

Dependencies

npm packages

clsxframer-motionlucide-reacttailwind-merge

Liro foundations, installed alongside it

liro-theme

States

All of them are drawn by the component. None is left for you to design.

  • Pending
  • Running
  • Done
  • Failed
  • Skipped
  • Folded

Accessibility

  • Keyboard reachable throughout, in visual order
  • Focus trapped in overlays, Escape closes them
  • Focus returns to whatever opened it
  • Live regions announce what changed, not that something did
  • Honours prefers-reduced-motion

Responsive behavior

  • Sizes to its container, not the viewport
  • Usable from 320px up
  • Pointer-based interaction, so trackpad and touch both work
  • No hover-only affordances

Used in a screenAll screens