Reasoning
Model thinking, open while it streams, then collapsed to a one-line summary with the time it took.
Installation
pnpm dlx shadcn@latest add @jds/reasoning
Usage
import { Reasoning, ReasoningContent, ReasoningTrigger } from "@/components/ai/reasoning"
<Reasoning isStreaming={isStreaming}>
<ReasoningTrigger />
<ReasoningContent>{part.text}</ReasoningContent>
</Reasoning>API Reference
Reasoning
| Prop | Type | Default |
|---|---|---|
isStreamingOpens the panel and runs the timer. Collapses once when it turns false. | boolean | false |
durationSeconds spent thinking. Measured automatically if omitted. | number | – |