JDS.

Search docs

Find a page or component

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

PropTypeDefault
isStreaming

Opens the panel and runs the timer. Collapses once when it turns false.

booleanfalse
duration

Seconds spent thinking. Measured automatically if omitted.

number–