LiveThinkingPanel
Hero example
When to use
Use LiveThinkingPanel anywhere the assistant streams thinking steps as it works — the /assistant chat, live agent traces, the playground post-stream replay. The panel is intent-first; steps should be emitted before the work starts, not after it completes, so the trail mirrors live intent.
think({ label }) event before each tool call so the trail mirrors live intent.Anatomy
The panel is a thin recipe over ThinkingTree in carded mode:
- Header. Always present. Reads
Thinking · step N of Mwhile live,Thought for {duration} · {n} stepsonce final. - Body. A vertical
<ol>of rows mirroring the ThinkingTree anatomy — hairline rail, dot, label. The active row carries the glass pill + moving-gradient shimmer. - Empty-live placeholder. When
state === "live"and no steps have been emitted yet, a singleThinking…placeholder row keeps the surface non-empty.
The panel is anchored to the left by MatterMarkAvatar in the recommended assistant-row recipe.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| stepsrequired | LiveThinkingStep[] | — | — |
| staterequired | LiveThinkingPanelState | — | — |
| elapsedMsrequired | number | — | Total elapsed time for the turn, in milliseconds. |
| onStepRevealed | (id: string) => void | — | Legacy hook for when a step's reveal animation completes. The v2 surface no longer needs this signal (the chat-panel reducer already promotes the previous step on every new `think` event), but the prop is kept for back-compat. Calls are silently ignored. |
| defaultOpen | boolean | — | Override the default open state. Defaults: live → open, final → closed. |
| className | string | — | — |
| aria-label | string | — | — |
onStepRevealed is a legacy hook from the previous word-reveal animation; it remains in the type signature for back-compat but is a no-op in the v2 surface. The chat-panel reducer already promotes the previous step to done on every new think event.
States
Variants
state is the primary axis:
live— body open, header readsThinking · step N of M, the latest step typing.final— body collapsed by default, header readsThought for X · N steps. Click the header to re-expand.
The body's open/closed state can be overridden with defaultOpen.
Density
Themes
Tokens consumed
Inherits all ThinkingTree tokens — --status-green, --status-red, --fg, --fg-muted, --fg-soft, --ink-8/15, --paper-72/85/90, --bg, --hairline, --focus-ring. No new tokens introduced.
Accessibility
- Header is a real
<button>witharia-expanded+aria-controls. - Group landmark via
role="group"+aria-label. - Active row carries
aria-current="step". prefers-reduced-motionhonoured by the underlying ThinkingTree.
Recipes
Assistant chat row
Mount the MatterMarkAvatar on the left, the panel on the right:
import { LiveThinkingPanel, MatterMarkAvatar } from "@matter/components";
export function AssistantRow({ steps, elapsedMs, state }) {
return (
<div className="flex items-start gap-3">
<MatterMarkAvatar />
<div className="min-w-0 flex-1">
<LiveThinkingPanel
elapsedMs={elapsedMs}
state={state}
steps={steps}
/>
</div>
</div>
);
}The avatar persists left of the collapsed-summary once state transitions to "final", so the avatar + header pair anchors each turn in the scrollback.
Source
packages/components/src/ThinkingTree/LiveThinkingPanelThinkingTree
Quiet editorial reasoning surface — a flat list of sequential steps with a five-state vocabulary (done · active · queued · failed · skipped), a hairline rail that darkens to the success ramp as work completes, and a translucent glass pill carrying the active row's continuous text shimmer.
MatterMarkAvatar
Square→circle spinning Matter mark — the assistant's presence chip. 28px black circle with an inner white square that dwells, accelerates into a near-circle from motion blur, decelerates, and settles. Five phantoms fade in during the fast middle to soften the silhouette.