Skip to content

Thinking Trace

Premium

A single steady line shows what an agent is thinking right now, then settles into how long it thought, with every step one click away.

AI Agent UIAI coding agentsResearch assistantsChat assistants

Thinking

Examples

Live reasoning steps

  1. Now: Reading the failing test

    The test expects 09:00 in Tokyo but gets 00:00, which is exactly the 9 hour offset.

Thinking
Completed reasoning

Thought for 65 seconds, 4 steps
Completed without steps

Thought for 1s

Thought for 1 second

Add to your projectPremium component

One command adds this component to your project.

1

Run the following command. New project? Run npx shadcn@latest init first to set up Tailwind and path aliases.

npx shadcn@latest add @aicanvas/••••••••••••
2

For dark mode, add the dark class to your <html> element:

Optional
<html class="dark">

Install with AI Canvas MCP

With AI Canvas MCP, your AI knows every component we ship. Ask for one inside Claude Code, Codex, or Cursor and it installs the component you pick. Works with any AI Canvas account, free or premium.

Props

Every prop this component accepts. Any other prop is forwarded to the underlying element.

ThoughtStep

PropTypeDefaultDescription
headlinereqstring-Summary shown for the reasoning step.
bodystring-Supporting explanation revealed when the trace is open; left out, only the headline is shown.
sourcesstring[]-Source labels shown beneath the explanation; left out, no sources are shown for the step.

ReasoningTrace

PropTypeDefaultDescription
stepsThoughtStep[]-Supplies the reasoning timeline; left out, host mode has no steps, while passing it turns the demo off.
status'thinking'|'done'|'stopped'-Sets the trace state; left out, host mode is idle, while passing it turns the demo off.
elapsedMsnumber-Shows the thinking or stopped duration in milliseconds; left out, no duration is shown in host mode, while passing it turns the demo off.
labelstring-Adds a label beside the trace status; left out, no label is shown, while passing it turns the demo off.
defaultOpenbooleanfalseSets whether the reasoning steps start expanded.
answerReact.ReactNode-Renders answer content below the trace whenever it is not thinking; left out, host mode shows no answer, while passing it turns the demo off.
onToggle(open: boolean) => void-Reports expansion changes while open state remains local; left out, expansion changes are not reported.
onStop() => void-Handles stopping and makes the stop control available while thinking; left out, host traces have no stop control.
classNamestring-Adds classes to the outermost root; left out, only the built-in classes are used.
tuningPartial<Tuning>-Overrides trace measurements, timing and motion values; left out, every value in TUNING is used.

About Thinking Trace

Reasoning Trace shows what an agent is thinking while it works. Thoughts stream in under phase headers such as Understand, Explore, Decide and Verify, the current phase shimmers and finished phases settle, and an honest timer ticks only while the agent thinks. Collapsed, it keeps the freshest thought visible on one line; expanded, long phases fold to their first lines. When the answer starts it becomes a one-line summary that stays expandable. Skip calls back to your code, keyboard toggles it, and it runs its own demo loop when rendered without props.

Built with

MotionTailwind CSS

Frequently asked questions

Is Thinking Trace free to use?
Thinking Trace is a Premium AI Canvas component. Premium unlocks the full source code, the full remix prompt, and one-command installs for every Premium component, block, and template.
How do I install Thinking Trace?
Premium unlocks one-command installs: run the shadcn CLI with your AI Canvas token, or connect the AI Canvas MCP server and ask your AI editor to install it for you. Premium also unlocks the full remix prompt in the Remix panel.
What is Thinking Trace built with?
Thinking Trace is built with React and TypeScript, using Motion and Tailwind CSS. It ships with both light and dark styling.
Where would I use Thinking Trace?
Common uses include AI coding agents, Research assistants, and Chat assistants. Like every AI Canvas component, it is self-contained and drops into any React project.
Can I remix Thinking Trace with AI?
Yes. Open "Remix with AI" on this page to read the setup and the constants Thinking Trace is built from. The engine, the markup and the notes on how it works are part of Premium. For the exact component, install it with the one-command CLI.

Featured in collections

More like this