# Reasoning

A collapsible thought trail with how long it took.

Section: Blocks / Chat
Page: https://ui.heyramzi.com/components/reasoning
Import path: `@heyramzi/ui/ai/reasoning`

## Import

```ts
import { Reasoning, ReasoningTrigger, ReasoningContent } from "@heyramzi/ui/ai/reasoning";
```

## Usage

```svelte
<Reasoning duration={4}>
  <ReasoningTrigger />
  <ReasoningContent>The model's reasoning, as text.</ReasoningContent>
</Reasoning>
```

## Demo

```svelte
<script lang="ts">
	import { Reasoning, ReasoningTrigger, ReasoningContent } from "@heyramzi/ui/ai/reasoning";
</script>

<div class="w">
	<Reasoning duration={4} open>
		<ReasoningTrigger />
		<ReasoningContent>
			AnimatedBeam already lives in @heyramzi/ui, so the fix is to re-export it and migrate the two
			consumers rather than copy the keyframes a third time.
		</ReasoningContent>
	</Reasoning>
</div>

<style>
	.w {
		width: 100%;
	}
</style>
```

## API

### Reasoning.Reasoning

| Prop | Type | Default | Notes |
| --- | --- | --- | --- |
| `isStreaming` | `boolean` | `false` |  |
| `duration` | `number` | `0` |  |
| `children` | `Snippet` |  |  |
| `open` | `boolean` | `false` | bindable |
| `class` | `string` |  |  |

Every prop of `Collapsible.Root` from `bits-ui`.

### Reasoning.Trigger

| Prop | Type | Default | Notes |
| --- | --- | --- | --- |
| `children` | `Snippet` |  |  |
| `class` | `string` |  |  |

Every prop of `Collapsible.Trigger` from `bits-ui`.

### Reasoning.Content

| Prop | Type | Default | Notes |
| --- | --- | --- | --- |
| `children` | `Snippet` |  |  |
| `class` | `string` |  |  |

Every prop of `Collapsible.Content` from `bits-ui`.
