Skip to content
WunderUI

Plan Summary

Pro

A plan on one card before it runs: the goal, steps, time and cost, the tools it uses and its phases.

Playground

Ship the Tabs v2 release

Drafted 3 min ago from the release notes

Steps
7
Est. time
18 min
Est. cost
$0.42

Tools

  • Figma API
  • GitHub
  • npm

Phases

  1. Prepare2 steps
  2. Update the tokens3 steps
  3. Ship2 steps

Installation

Plan Summary comes with WunderUI Core and Pro, in the package from your plan. See the plans.

Then import what you need:

tsx
import { PlanSummary, PlanSummaryPhase, PlanSummaryStat } from "@wunderui/react"

Then use it:

tsx
import { PlanSummary } from "@wunderui/react"

export function Summary({ onRun }: { onRun: () => void }) {
  return (
    <PlanSummary
      goal="Ship the Tabs v2 release"
      stats={[
        { label: "Steps", value: "7" },
        { label: "Est. time", value: "18 min" },
        { label: "Est. cost", value: "$0.42" },
      ]}
      onRun={onRun}
    />
  )
}

Expected result: You should see a card with the title Ship the Tabs v2 release, three figures under it (7, 18 min and $0.42) and a Run plan button.

When to use

Use Plan Summary for

  • The plan on one card before anything runs, with the estimate, the tools and the phases
  • A go or no-go step where a person can still edit the plan
  • A short status of a run in a few numbers, with the buttons that fit that state

Use something else for

  • Agent Plan for the steps of the plan, to edit them before the run or to follow them during it
  • Approval Card for a gate in the middle of a run that a person has to answer
  • Usage Meter for what a run has spent against its budget, as a meter

Contents

Only the goal is required. Stats, tools and phases each appear when they have items, so a small plan stays a small card.

Ship the Tabs v2 release

Drafted 3 min ago from the release notes

Stats

A stat is a label and a value you format. Put the unit in the value and use English number formats: 1,204 pages, 1,842,000 tokens, $69.98; progress is a stat such as 3 of 7.

Ship the Tabs v2 release

Drafted 3 min ago from the release notes

Steps
7
Est. time
18 min
Est. cost
$0.42

Actions

Edit plan and Run plan appear only when you pass their handlers, so a running or finished plan shows no buttons. Change the labels to match what the button does, such as Resume.

Ship the Tabs v2 release

Steps
7
Est. time
18 min
Est. cost
$0.42

Keyboard interactions

The two buttons are native buttons, so the browser provides focus and activation. There are no other controls.

TaborShiftTab
Moves focus to the next or previous button: Edit plan, then Run plan. A button that is not drawn is not in the order. Focus shows as an indigo border with a 2 px ring.
EnterorSpace
Presses the focused button and calls or .

Behavior and motion

What the card names, which parts it draws, and what it leaves to you.

Name
The card is a section named by its goal. The goal is a paragraph, not a heading, so add your own heading above the card where one belongs.
Lists
Stats are a definition list, tools an unordered list and phases an ordered list, so a screen reader announces each label and the number of items.
What is drawn
Stats, tools and phases appear only when they have items, and Edit plan and Run plan only with their handlers. The buttons have no disabled state, so leave the handler out instead.
Numbers
The card does not format numbers, so pass strings with the unit and English separators. A numeric step count in a phase reads 1 step or n steps; other values show as written.
Progress
The card has no progress bar and no live region. Write progress into the stats and phase counts, and announce changes in a status line next to the card.
Motion
The card has no motion of its own. The buttons only change colour when pressed, so there is nothing to reduce.

Anatomy

The figure shows a draft with every part. Stats, tools, phases and actions appear only when they have content.

Ship the Tabs v2 release

Drafted 3 min ago from the release notes

Steps
7
Est. time
18 min
Est. cost
$0.42

Tools

  • Figma API
  • GitHub
  • npm

Phases

  1. Prepare2 steps
  2. Update the tokens3 steps
  3. Ship2 steps
  • data-slot="plan-summary"

    A card named by its goal, with a 1 px border, a 16 px radius, 16 px padding and 16 px between its parts.

  • The goal in 17 px semibold text. It is a paragraph, not a heading, and names the card for assistive technology.

  • Optional

    Optional description in 13 px tertiary text under the goal, such as where the plan came from.

  • Optional

    Label and value pairs, with 12 px labels over 20 px semibold values in tabular figures. The pairs wrap onto a new line when the card is narrow.

  • Optional

    The tools as indigo pills in a list under the label Tools.

  • Optional

    An ordered list under the label Phases: title on the left, count on the right. A number reads 1 step or n steps; text is shown as given.

  • Optional

    Edit plan as a plain button and Run plan as the primary one, in that order. Each appears only when its handler is passed.

Best practices

  • Do

    Put the unit in the value and use English number formats, such as 18 min, $0.42 and 1,842,000. Time and cost are what people decide on.

  • Do

    Say where the plan came from in the description, and list every tool it will touch. A plan that hides a tool hides what it may change.

  • Do

    Pass the run handler only when the plan may start. Without it the Run plan button is not drawn, and a running or finished plan passes neither handler.

  • Do

    Change the run label to what the button does now, such as Resume or Retry failed step.

  • Do

    Say what happened in a status line next to the card. The card is not a live region.

  • Don’t

    Don't start the run before Run plan is pressed. A plan that starts itself is a pre-approved plan.

  • Don’t

    Don't use the stats as a progress bar, since the card has none. Write progress as a stat such as 3 of 7, or put a Progress next to the card.

API reference

PlanSummary is a plain component, not a wrapper of a primitive, so this table lists every prop.

A card named by its goal, with a 1 px border, a 16 px radius, 16 px padding and 16 px between its parts.

PropTypeDefaultDescription
goal requiredReactNode—What the plan is for. It is the title of the card and names it for assistive technology.
descriptionReactNode—Where the plan came from or where the run stands, such as .
statsPlanSummaryStat[][]Label and value pairs, , usually Steps, Est. time and Est. cost. The value is a node you format, with its unit.
toolsstring[][]The names of the tools the plan will use, as strings. They are drawn as indigo pills.
phasesPlanSummaryPhase[][]How the work splits up, . A number for reads or ; text such as or is shown as written.
onEdit() => void—Draws the Edit plan button and is called when it is pressed. Leave it out to hide the button.
onRun() => void—Draws the Run plan button and is called when it is pressed. Leave it out to hide the button.
editLabelstring"Edit plan"The words on the edit button. Defaults to Edit plan.
runLabelstring"Run plan"The words on the run button, such as Resume or Retry failed step. Defaults to Run plan.
classNamestring—Extra classes for the card, for example a width.

Notes for AI

Give your coding assistant the Markdown reference instead of screenshots.

MCPget_component("plan-summary")
InstallIncluded in Core and Pro

The full library index for assistants is at /llms.txt.