Reasoning
Collapsible “Thinking…” / “Thought for 8s” disclosure for model reasoning.
Code
import * as React from 'react';
import { Reasoning } from '@fruit-labs/design';
export default function Demo() {
return (
<div
style={{
display: 'flex',
flexDirection: 'column',
gap: 10,
maxWidth: 560,
}}
>
<Reasoning thinking />
<Reasoning duration="8s" defaultOpen>
The user wants three bullets. The report has four sections; merge cost and margin.
</Reasoning>
</div>
);
}Install
From npm:
npm install @fruit-labs/design
import { Reasoning } from '@fruit-labs/design';Or copy the TypeScript source into your project:
npx shadcn@latest add https://design.fruitlabs.online/r/reasoning.jsonGuidelines
- Collapsed by default; never block the answer behind it.
Props
| Prop | Type | Required |
|---|---|---|
thinking | boolean | No |
duration | string | No |
label | string | No |
defaultOpen | boolean | No |
className | string | No |
children | React.ReactNode | No |