Reasoning trail

Pro

The agent's thinking chain in a chat: steps on one hairline with their thoughts and sources, streamed with a soft edge, folding into one line when the answer starts, any retry or failure kept.

Pro opens soon
npx shadcn@latest add @pixilui-pro/reasoning-trail

Preview

Folds into one line when the answer starts; anything that went wrong stays on it.
Head

When to use

Use it when

  • Above an agent's answer: what it read, looked up and concluded, as it happens, then one click away.
  • An answer with citations: ReasoningTrailStream streams it with the soft edge and ReasoningTrailCitation opens the dark source card that keeps the claim dark.
  • A past message: pass the finished steps with status done and it arrives drawn (settled).

Use something else when

  • Only the current action and a timer: use thinking state (free), the same line without steps.
  • A run's tool calls with inputs and outputs: use the tool call row.
  • A run's timeline across many runs: use the run timeline.

Installation

reasoning-trail.tsx568 linesPro
Pro opens soon

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-trail.tsx and the free thinking-mark.tsx, the free agent-status.tsx, the free thinking-state.tsx and the free chip.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}" }
    }
  }
}
Terminal
npx shadcn@latest add @pixilui-pro/reasoning-trail

Adds reasoning-trail.tsx with thinking-mark.tsx, agent-status.tsx, thinking-state.tsx and chip.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.

Usage

example.tsx
import { ReasoningTrail } from "@/components/pixilui/reasoning-trail";

<ReasoningTrail steps={steps} />

Fills its column; thoughts wrap at the reading measure. The card is 320 wide, kept inside the window, and opens above when there is no room below.

API reference

PropTypeDefault
stepsRequiredReasoningTrailStep[]–The agent's work so far, in order. Add steps as they happen; a step keeps its element by id.
thoughtCpsnumber–How fast thoughts stream, letters a second (--pixilui-trail-thought-cps, 70, by default).

Keyboard

Enter SpaceOn the head: folds or opens the steps.
TabReaches each citation; focus opens its card.
EscCloses the open citation card.

Accessibility

  • The head is a button with aria-expanded; its words are role status, so each phase is announced politely.
  • Streaming text is aria-busy until it lands. Citations are buttons named "Source: Snowflake"; the card is role tooltip, tied by aria-describedby.
  • Step icons and the mark are aria-hidden. Retries and failures are words, never only a color.

Motion

  • A step fades in place and the hairline draws down to it (250ms); its label changes with the quiet swap; the live label carries the text shimmer.
  • Thoughts stream at 70 letters a second and the answer at 120 with the soft edge: each letter fades in, so the front is a gradient about 18 letters long, with no cursor; a citation arrives with its text, taking a word's time.
  • Source chips gather one at a time, 420ms apart.
  • The fold: the time stops, Working becomes Worked for, the flag joins, the steps fade and rise, then the space closes. Opening reverses it, and either turns around halfway.
  • A citation's card grows from its pointer below the chip after a short wait (200ms in, 150ms out); the claim stays dark while the rest of the answer dims.
  • Reduced motion: text whole at once, chips together, no band, the fold and the card instant.
Thinking stateSays what the agent is doing with a live timer, then folds to Worked for 14s.
Reasoning summaryFolded while it works: the action and its mark change together, then it reads Worked for.
Activity mark36 tiny animations act out the work, and a new state hands over cell by cell.

PixilUI Pro opens soon. The first 20 licenses are $99.