Reasoning

Collapsible panel for a model’s reasoning — opens and shimmers "Thinking…" while it streams, then settles to "Thought for N seconds"

Category: display · WCAG 2.2-AA · ai, reasoning, thinking, chain-of-thought, disclosure, collapsible

States

Props

PropTypeDefaultDescription
childrenReactNode—The reasoning text or steps.
streamingbooleanfalseTrue while reasoning is still arriving: the panel opens, the trigger shimmers "Thinking…" and the content is aria-busy. Turning it off closes the panel.
durationnumber—Seconds spent reasoning. Once streaming ends the trigger reads "Thought for {duration} seconds"; without it, "Reasoning". The caller owns the clock.
labelReactNode—Replaces the trigger text in every state.
labels{ thinking?: string; thoughtFor?: string; label?: string }—Overrides for the component’s user-visible strings (i18n). `thoughtFor` may contain `{count}`.

Design tokens

When to use

When not to use

How to build an accessible Reasoning in React →

Examples

Streaming

<Reasoning streaming>The user wants a summary, so I will start with the totals…</Reasoning>

Settled

<Reasoning duration={12}>The user wants a summary, so I started with the totals and then compared regions.</Reasoning>

Related components

← Back to docs