ComponentsAgent Plan

Agent Plan

A vertical checklist of what an agent plans to do and how far it has got — with substeps, re-planning and a progress rail that fills as steps complete.

Preview

Building your landing page

0 of 6

  1. Research competitors, not started

    Scan five landing pages in the same category for structure and messaging.

    • Collect URLs, not started
    • Extract section layout, not started
    • Summarise positioning, not started
  2. Draft hero copy, not started

    Three headline options with supporting subtext.

  3. Generate layout, not started

    Hero, feature grid, social proof and pricing sections.

    • Hero section, not started
    • Feature grid, not started
    • Pricing table, not started
  4. Create illustrations, not started
  5. Build components, not started

    React + Tailwind, responsive down to 375px.

  6. Deploy preview, not started

Installation

  1. 1

    Run the following command

    npx shadcn@latest add https://localhostui.com/r/agent-plan.json
    

The finished-plan badge uses a success color token. The CLI adds it for you; for a manual install add --success to your theme (see app/globals.css) and --color-success: var(--success); to @theme inline.

Examples

Re-planning

Agents change their mind. Insert a step with a new id and it slides in while the rail extends:

setSteps((steps) => {
  const i = steps.findIndex((s) => s.id === "deploy");
  return [...steps.slice(0, i), { id: "a11y", title: "Accessibility pass", status: "todo" }, ...steps.slice(i)];
});

Compact variant

<AgentPlan title="Exporting" steps={steps} variant="compact" collapsible={false} />

Pairing with ToolCall

{
  id: "search",
  title: "Research competitors",
  status: "active",
  meta: <ToolCall name="search_web" title="Searching the web" status="running" startedAt={t0} />,
}

Failed step with retry

{
  id: "images",
  title: "Create illustrations",
  status: "failed",
  meta: <button onClick={retryFromImages}>Retry from here</button>,
}

Props

AgentPlan

PropTypeDefaultDescription
titleReactNode"Plan"Plan title.
steps*PlanStep[]—The plan. Keep ids stable across re-plans.
onStepClick(step: PlanStep) => void—Makes rows clickable (Enter / Space too).
collapsiblebooleantrueShow the collapse button.
defaultCollapsedboolean—Start collapsed.
variant
"vertical""compact"
"vertical"Timeline, or a dot row with the active label for small spaces.

PlanStep

PropTypeDefaultDescription
id*string—Stable id.
title*string—Step label.
status*
"todo""active""done""failed""skipped"
—active shimmers and ripples, done draws a check, failed shakes, skipped is struck through.
descriptionstring—Muted helper text, clamped to two lines.
substepsPlanStep[]—Auto-expanded while the step is active, collapsed when done (the user can reopen).
startedAt / endedAtnumber | Date—Per-step duration on the right; also drives the header's elapsed time.
metaReactNode—Extra UI under the step — an error with “Retry from here”, or a ToolCall.

Accessibility

  • The plan is a list; the active step has aria-current="step" and every step has a visually hidden status (“completed”, “in progress”).
  • The header bar is a role="progressbar" with aria-valuenow.
  • With reduced motion: no ripple, no rail fill animation, no shake.