DocsComponentsTemplatesThemesGitHub

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.json

Guidelines

  • Collapsed by default; never block the answer behind it.

Props

PropTypeRequired
thinkingbooleanNo
durationstringNo
labelstringNo
defaultOpenbooleanNo
classNamestringNo
childrenReact.ReactNodeNo

Edit this example on GitHub