Locara
← All components AI affordances

Reasoning

Collapsible chain-of-thought block. Streams 'Thinking…' with bouncing dots, settles into 'Thought for Ns' with the full reasoning when expanded.

Inspired by Claude reasoning blocks, o1/o3 thinking display, DeepSeek-R1.

Preview

What it looks like.

The user is asking about LLM memory tradeoffs on M-series Macs. I should consider: (1) parameter count → bytes at the chosen quantization, (2) KV cache size which grows linearly with context, (3) overhead for activations + OS. Q4_K_M is roughly 4.9 bits per weight. So a 7B model is ~4.3 GB just for weights…
Usage

Drop it into your app.

import { Reasoning } from '@locara/components'

<Reasoning
  streaming={isThinking}
  durationSeconds={thoughtTime}
  content={reasoningText}
/>

Or copy the source into your repo: locara add reasoning

Design notes

Why it works this way.

Default collapsed — opening the block is the user's deliberate choice, not the model's broadcast. The streaming state uses bouncing dots; the settled state shows an Anthropic-style sparkle glyph. Body text is monospaced to visually distinguish it from the model's final prose.