# Reasoning

A quiet, collapsible public reasoning summary that follows the stream.

- **Use it for**: A collapsible public summary of how the reply was reached.
- **Not for**: Private chain of thought; do not show it. Try [ChainOfThought](https://unseenui.com/components/chain-of-thought/).

## Installation

```bash
npm install @stackunseen/ui
```

## Usage

```tsx
import { Reasoning } from '@stackunseen/ui/assistant';
import '@stackunseen/ui/styles.css';

<Reasoning summary={summary} state="complete" durationMs={3200} />
```

## All props

| Prop | Type | Description |
| --- | --- | --- |
| `className` | `string` |  |
| `defaultOpen` | `boolean` |  |
| `durationMs` | `number` | Host-measured duration. |
| `onOpenChange` | `((open: boolean) => void)` |  |
| `open` | `boolean` |  |
| `state` (required) | `"complete" \| "streaming"` | "streaming" while the summary arrives; "complete" once the host finishes it. |
| `summary` (required) | `string` | Public reasoning summary supplied by the host. |

## Keyboard

Tab reaches controls; Enter or Space activates buttons. Accordions use arrow keys, Home and End. Select menus support arrows and typeahead; Escape closes menus and dialogs and restores focus.

## Works with

[SuggestTextarea](https://unseenui.com/components/suggest-textarea/), [Checkpoint](https://unseenui.com/components/checkpoint/), [SlashCommandMenu](https://unseenui.com/components/slash-command-menu/), [ThreadList](https://unseenui.com/components/thread-list/), [BranchSwitcher](https://unseenui.com/components/branch-switcher/), [MessageQueue](https://unseenui.com/components/message-queue/), [PromptInput](https://unseenui.com/components/prompt-input/), [Message](https://unseenui.com/components/message/), [MessageActions](https://unseenui.com/components/message-actions/), [StreamingResponse](https://unseenui.com/components/streaming-response/), [Suggestions](https://unseenui.com/components/suggestions/), [FollowUps](https://unseenui.com/components/follow-ups/)

Page: https://unseenui.com/components/reasoning/
