Steps

Displays a sequence of operations in a collapsible layout. Each step can include details and an optional vertical bar. Useful for showing AI steps like reasoning traces, tool calls, or process logs.

Examples

Steps basic

Searching files in repo...
Found 12 files (src, docs)
Parsing markdown and code blocks
Selecting tool: summarize
Running summarize(tool) with top 5 files
Summary generated

Steps with sources

You can use the Source component to display sources in the Steps block.

Searching across curated sources...
Top matches
Extracting key sections and summarizing…

Steps with custom icons swap and bar

Initializing build context
Scanning 25 markdown files
Generating embeddings (chunk size: 1,024)
Index created

Steps with Text Shimmer Loader

You can use the Loader component to display a text shimmer loader in the Steps block.

Planning next actions…
Searching repository files…
Parsing and extracting key sections…
Ready to respond

Installation

npx shadcn add "https://prompt-kit.com/c/steps.json"

Component API

Steps

PropTypeDefaultDescription
defaultOpenbooleantrueWhether the Steps starts expanded
classNamestringAdditional CSS classes
...propsReact.ComponentProps<Collapsible>Root collapsible component props

StepsTrigger

PropTypeDefaultDescription
childrenReact.ReactNodeTrigger content (label)
leftIconReact.ReactNodeOptional left icon area; keeps width to avoid layout jump
swapIconOnHoverbooleantrueSwap leftIcon with chevron on hover
classNamestringAdditional CSS classes
...propsReact.ComponentProps<CollapsibleTrigger>Trigger props forwarded to CollapsibleTrigger

StepsContent

PropTypeDefaultDescription
classNamestringAdditional CSS classes
barReact.ReactNode<StepsBar />Optional bar element rendered at the left
...propsReact.ComponentProps<CollapsibleContent>Collapsible content props

StepsBar

PropTypeDefaultDescription
classNamestringbg-muted h-full w-[2px]Classes for positioning and style
...propsReact.HTMLAttributes<HTMLDivElement>Pass-through div attributes/styles

StepsItem

PropTypeDefaultDescription
childrenReact.ReactNodeRow item content
classNamestringAdditional CSS classes
...propsReact.ComponentProps<'div'>Pass-through div attributes/styles

StepsRoot

PropTypeDefaultDescription
defaultOpenbooleantrueWhether the Steps starts expanded
classNamestringAdditional CSS classes
...propsReact.ComponentProps<Collapsible>Root collapsible component props