Reasoning summary
ProThe reasoning trail folded to its working line: the activity mark and what the agent is doing in words with a timer, then Worked for 14s with any retry kept on the line, opening to the full trail.
npx shadcn@latest add @pixilui-pro/reasoning-summaryPreview
import { useReasoningTrailSimulation } from "@/components/pixilui/reasoning-trail";
import { ReasoningSummary } from "@/components/pixilui/reasoning-summary";
// One finished element: the run plays by itself.
export const knobs = {} as const;
/** A chat turn: the summary line plays the run, names each action with its mark, and folds into Worked for. */
export default function ReasoningSummaryDemo() {
const run = useReasoningTrailSimulation();
return (
// a centered column, as the lock sets the question and the line
<div className="mx-auto flex w-full max-w-xl flex-col gap-4 rounded-panel bg-surface p-6 elevation-raised">
<p className="self-end rounded-control bg-surface-muted px-3 py-2 type-label text-foreground">Did the new onboarding help retention?</p>
<ReasoningSummary status={run.status} words={run.words} mark={run.mark} flag={run.flag} steps={run.steps} />
{run.answering ? <p className="type-body text-foreground">Yes, more than the dashboard shows: 38% to 46% without the launch signups.</p> : null}
</div>
);
}When to use
Use it when
- A chat answer whose reasoning should stay out of the way: one line while it works, one click to the steps.
- Past messages in a thread: status done with the steps, settled.
Use something else when
- When the steps should show as they happen: use the reasoning trail open (head working).
- No steps at all: use thinking state (free).
Installation
Join the waitlist and we'll email you when PixilUI launches. The preview, props and docs stay open until then.
Pro installs with the same CLI as the free items. One command adds reasoning-summary.tsx and the free thinking-mark.tsx, the free agent-status.tsx, the free thinking-state.tsx, the free chip.tsx and reasoning-trail.tsx it uses; your license key goes in once, as in Installation.
{
"registries": {
"@pixilui-pro": {
"url": "https://pixilui.com/r/pro/{name}.json",
"headers": { "Authorization": "Bearer ${PIXILUI_TOKEN}" }
}
}
}npx shadcn@latest add @pixilui-pro/reasoning-summaryAdds reasoning-summary.tsx with thinking-mark.tsx, agent-status.tsx, thinking-state.tsx, chip.tsx and reasoning-trail.tsx, and installs clsx and tailwind-merge. The CLI reads PIXILUI_TOKEN from .env.local; if this computer has not logged in yet, run npx pixilui@latest login once.
components/pixilui/reasoning-summary.tsxthe item, 23 linescomponents/pixilui/thinking-mark.tsxused inside, freecomponents/pixilui/agent-status.tsxused inside, freecomponents/pixilui/thinking-state.tsxused inside, freecomponents/pixilui/chip.tsxused inside, freecomponents/pixilui/reasoning-trail.tsxused insideIt uses Activity mark, Agent status, Thinking state, Chip and Reasoning trail: add them the same way. Then npm i clsx tailwind-merge, and add the foundation once per app, as in Installation.
Usage
import { ReasoningSummary } from "@/components/pixilui/reasoning-summary";
<ReasoningSummary />One line, as wide as its words; opened, the steps fill the column.
API reference
markThinkingMarkState–The activity mark leading the line. Defaults to the live step's kind (think: thinking, query: fetching, read: reading).Keyboard
Accessibility
- The line is a button with aria-expanded; its words are role status, so each action is announced politely.
- The mark is aria-hidden; the words carry the meaning. Retries and failures are words.
Motion
- Each new action's words come in letter by letter out of a soft blur while the old ones lift away; the mark hands over from the centre at the same time.
- The live words carry the text shimmer; the timer counts whole seconds. When the answer starts the mark draws its tick and the line reads Worked for.
- Opening shows the trail's steps with the fold; reduced motion makes every change instant.