ThinkingSteps

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

Installation

Basic

Searched the web
Read 3 sources
Done

Minimal

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

Ran a command
Done

Streaming

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

Streaming Text

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

With Images

Steps can include inline images with optional captions using ThinkingStepImage.

Full Example

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

API Reference

ThinkingSteps

PropTypeDefaultDescription
defaultOpenbooleantrueWhether the accordion starts expanded (uncontrolled).
openbooleanControlled open state. Use with onOpenChange.
onOpenChange(open: boolean) => voidCallback when the open state changes.
classNamestringAdditional 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.
labelstringStep label text.
descriptionstringOptional secondary text below the label.
status"complete" | "active" | "pending""complete"Step state. Pending steps are hidden; active steps show shimmer text.
indexnumberPosition index for proximity hover registration.
delaynumber0Entrance animation delay in seconds.
isLastbooleanfalseHides the connector line below this step.

ThinkingStepDetails

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

ThinkingStepSource

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

ThinkingStepImage

PropTypeDefaultDescription
srcstringImage URL.
altstring""Alt text for accessibility.
captionstringOptional caption below the image.
delaynumber0Entrance animation delay in seconds.