Reasoning
A collapsible component for displaying AI reasoning steps and chain-of-thought processes.
npx @slipstream-ui/cli@latest add reasoningPlayground
Variants
Step 1
I need to analyze the user's request for key requirements.
Step 2
The user wants to know about React component libraries.
Step 1
I need to analyze the user's request for key requirements.
Step 2
The user wants to know about React component libraries.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| steps | ReasoningStep[] | required | Array of reasoning steps |
| collapsible | boolean | true | Whether reasoning can be collapsed |
| defaultExpanded | boolean | false | Whether expanded by default |
Accessibility
- Uses aria-expanded to communicate collapsible state
- Collapsible button is keyboard accessible
- Steps are numbered for easy reference
- Visual hierarchy with clear step indicators
Browser support
| Browser | Tested versions |
|---|---|
| Chrome | 111+ (Mar 2023) |
| Edge | 111+ (Mar 2023) |
| Firefox | 121+ (Dec 2023) |
| Safari | 17.2+ — macOS & iOS (Dec 2023) |
Slipstream components rely only on CSS custom properties, Flexbox/Grid, and ARIA — the everyday baseline of the last two years of evergreen releases. Anything newer is progressive enhancement: unsupported browsers keep full functionality with static behavior instead of animations.