ThinkingSteps

Chain-of-thought reasoning display with collapsible steps, sequential animation, source badges, and image support.

Installation

This component is primitive-agnostic — same source under both flavors.

Basic

Inspect
Searched the web
Read 3 sources
Done

Minimal

The simplest usage — two dots with no children or extras.

Inspect
Ran a command
Done

Streaming

Steps appear sequentially as they stream in. Active steps show a shimmer effect.

Inspect

Streaming Text

Dots with long descriptions that stream in character by character, simulating LLM output.

Inspect

With Images

Steps can include inline images with optional captions using ThinkingStepImage.

Inspect

Full Example

A 6-step research agent combining sources, details, descriptions, images, and a custom header.

Inspect

API Reference

ThinkingSteps

PropTypeDefaultDescription
defaultOpenbooleantrueWhether the accordion starts expanded (uncontrolled).
openboolean—Controlled open state. Use with onOpenChange.
onOpenChange(open: boolean) => void—Callback when the open state changes.
classNamestring—Additional CSS classes for the root container.

ThinkingStepsHeader

PropTypeDefaultDescription
childrenReactNode"Thinking"Header label text.

ThinkingStep

PropTypeDefaultDescription
iconIconName"dot"Icon name from the icon library.
showIconbooleantrueShow the icon. When false, displays a small dot instead.
labelstring—Step label text.
descriptionstring—Optional secondary text below the label.
status"complete" | "active" | "pending""complete"Step state. Pending steps are hidden; active steps show shimmer text.
indexnumber—Position index for proximity hover registration.
delaynumber0Entrance animation delay in seconds.
isLastbooleanfalseHides the connector line below this step.

ThinkingStepDetails

PropTypeDefaultDescription
summarystring—Collapsed label text (e.g. "Explored 6 files").
detailsstring[]—Shorthand list of detail lines rendered automatically.
defaultOpenbooleanfalseWhether the nested accordion starts expanded.
childrenReactNode—Custom content inside the expanded area.

ThinkingStepSource

PropTypeDefaultDescription
colorBadgeColor"gray"Badge color from the Tailwind palette.
delaynumber0Entrance animation delay in seconds.
childrenReactNode—Source label text.

ThinkingStepImage

PropTypeDefaultDescription
srcstring—Image URL.
altstring""Alt text for accessibility.
captionstring—Optional caption below the image.
delaynumber0Entrance animation delay in seconds.