Components / Reasoning / Reasoning
Reasoning
A collapsible "thinking" block that auto-opens while streaming and closes when done.
Installation
Install the Reasoning React component with the shadcn CLI (after adding the @ai-primitive registry and theme, see Installation):
npx shadcn@latest add @ai-primitive/reasoning
Usage
import { Reasoning, ReasoningTrigger, ReasoningContent } from "@/components/ui/reasoning"
Related components
- Chain of Thought - A vertical trail of collapsible reasoning steps, connected by a line.
- Steps - A collapsible, numbered list of completed steps with a side rail.
- Tool - A collapsible tool-call card showing its state, input, output, or error.
- Source - An inline citation chip that opens a hover card with the linked page's details.
Previous: Chat Container · Next: Chain of Thought