Reasoning
Collapsible thinking block that follows streaming.
Import
tsx
import { Reasoning } from "@cronus-ui/ui";
bash
npx cronus-ui add reasoning
Examples
.cronus
The same component declared in Cronus. Emitted at build time from the audit fixtures — the kernel renders it as HTML with no React.
default.cronus
app "audit-fixtures" {
port 5176
}
style {
preset aurora
theme dark
}
component ReasoningDefault layout:inline style:reasoning {
duration:3
label "The user wants a summary, so list the three biggest changes first."
}
page "/audit/reasoning/default" type:custom {
use ReasoningDefault
}
API Reference
Generated from the component's exported types.
ReasoningLabels
| Prop | Type | Default | Description |
|---|---|---|---|
thinking* | string | — | — |
thoughtForFew* | string | — | — |
thoughtFor* | string | — | Use `{duration}` as the seconds placeholder. |
ReasoningProps
Extends ComponentProps<typeof Collapsible>
| Prop | Type | Default | Description |
|---|---|---|---|
isStreaming | boolean | false | — |
open | boolean | — | Controlled open state. |
defaultOpen | boolean | true | Uncontrolled initial open state. |
onOpenChange | (open: boolean) => void | — | Called when the open state changes. |
duration | number | — | — |
labels | Partial<ReasoningLabels> | — | Override default English strings. |
children | ReactNode | — | Contents of the component. |
disabled | boolean | — | Disables pointer and keyboard interaction. |
ReasoningTriggerProps
Extends ComponentProps<typeof CollapsibleTrigger>
| Prop | Type | Default | Description |
|---|---|---|---|
asChild | boolean | — | Render as the child element via Slot. |
children | ReactNode | — | Contents of the component. |
className | string | — | Additional class names merged onto the root. |
ReasoningContentProps
Extends ComponentProps<typeof CollapsibleContent>
| Prop | Type | Default | Description |
|---|---|---|---|
forceMount | boolean | — | Keep the node mounted when closed, for exit animation. |
asChild | boolean | — | Render as the child element via Slot. |
children | ReactNode | — | Contents of the component. |
className | string | — | Additional class names merged onto the root. |