Thinking

Expandable traces — steps, reasoning, search, coding.

Installation

pnpm dlx shadcn@latest add @ward/thinking-state

Add the Ward registry to components.json once:

"registries": {
  "@ward": "https://ward.so/r/{name}.json"
}

Or install from the URL with no configuration: npx shadcn@latest add https://ward.so/r/thinking-state.json

Usage

import ThinkingState from "@/components/ward/ThinkingState";
<ThinkingState
  variant="Coding"
  active="Running tools"
  done="Ran 2 tools"
  rows={[
    { primary: "Read", secondary: "routes.ts", mono: true },
    { primary: "Edit", secondary: "App.tsx", mono: true, add: 12, del: 4 },
  ]}
/>

Props

PropTypeDefaultDescription
variant"Steps" | "Reasoning" | "Search" | "Coding""Steps"Trace style and built-in content: a step list, prose reasoning, a web search or a tool run.
onSettled() => void-Called once when the trace stops working, so later content can be shown after it.
rowsRow[]-Trace rows that replace the built-in content, each with primary text and optional secondary, mono, add, del and href fields.
activestring-Header text shown while the trace is working, replacing the variant's default.
donestring-Header text shown once the trace settles, replacing the variant's default.
iconReactNode-Header glyph that replaces the default sparkle.

Ward · Version 1.1.0 · Registry manifest