A brand-led “Reasoning trail” shows how the answer was reached — a sequence of reasoning nodes stepping from complete, through the active move, to what is still pending.
Loading demo: reasoning-trace-real-world
npx sdaia-ui@latest add reasoning-disclosure reasoning-node thinking-step
import { ThinkingStep } from '@/components/ui/ThinkingStep';
import { ReasoningNode } from '@/components/ui/ReasoningNode';
import { ReasoningDisclosure } from '@/components/ui/ReasoningDisclosure';1<ReasoningNode2state="active"3title="Comparing policy applicability"4rationale="Checking entity type, jurisdiction, effective date, and exceptions."5/>
A single line of thinking — an icon, a title and a short description.
Loading demo: thinking-step-default
A step with a state (active / complete / pending) and a rationale summary.
Loading demo: reasoning-node-default
An expandable, full-inline summary that tucks the reasoning behind a toggle.
Loading demo: reasoning-disclosure-default
Reasoning nodes move through active, complete and pending states as the trail progresses.
Loading demo: reasoning-node-states
Prop | Type | Default | Required |
|---|---|---|---|
variant | 'neutral' | 'brand' | 'outline' | 'neutral' | optional |
dir | 'ltr' | 'rtl' | — | optional |
icon | ReactNode | <ReasoningHeadIcon /> | optional |
title | ReactNode | — | optional |
titleTrailing | ReactNode | — | optional |
description | ReactNode | — | optional |
as | ElementType | 'div' | optional |
Prop | Type | Default | Required |
|---|---|---|---|
variant | 'neutral' | 'brand' | 'outline' | 'neutral' | optional |
state | 'active' | 'complete' | 'pending' | 'active' | optional |
dir | 'ltr' | 'rtl' | — | optional |
icon | ReactNode | <ReasoningHeadIcon /> | optional |
title | ReactNode | — | optional |
statusLabel | ReactNode | state name | optional |
rationale | ReactNode | — | optional |
labels | Partial<ReasoningNodeLabels> | — | optional |
as | ElementType | 'div' | optional |
Prop | Type | Default | Required |
|---|---|---|---|
variant | 'neutral' | 'brand' | 'outline' | 'neutral' | optional |
dir | 'ltr' | 'rtl' | — | optional |
expanded | boolean | — | optional |
defaultExpanded | boolean | false | optional |
onExpandedChange | (expanded: boolean) => void | — | optional |
icon | ReactNode | <ReasoningHeadIcon /> | optional |
title | ReactNode | 'Reasoning summary' | optional |
subtitle | ReactNode | — | optional |
items | ReasoningDisclosureItem[] | [] | optional |
expandLabel | string | 'Expand reasoning summary' | optional |
collapseLabel | string | 'Collapse reasoning summary' | optional |
labels | Partial<ReasoningDisclosureLabels> | — | optional |
as | ElementType | 'div' | optional |
How this component behaves at the three system breakpoints. Spacing and type tokens switch automatically at 768px and 1280px.
| Screen | Behavior |
|---|---|
| Desktop (1280px and up) | Steps, nodes and the disclosure fill the width of their container. |
| Tablet (768–1279px) | Same layout as desktop, with the tablet token values. |
| Phone (under 768px) | Same layout with the mobile token values. Step text and queries wrap, including long words; titles in the disclosure are truncated. |