Thinking Trace
The block shown while a model reasons, done properly. A soft light sweeps the label, a timer counts real seconds, and the latest thought streams in underneath.
Needs: None. Simulated from `steps` by default; pass `stream` for real reasoning tokens.
Customize
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| steps | string[] | required | Thought lines, revealed one after another over `duration`, each typed out as if it were being thought. Required unless you pass `stream` instead. |
| stream | AsyncIterable<string> | – | Real reasoning text as it arrives, split into lines on "\n". Thinking ends when the stream does. Read once, so remounts don't lose it. |
| done | boolean | – | Controlled. true collapses it into the pill; false keeps it thinking after the lines or stream run out. Left out, it finishes on its own. |
| duration | number | 8 | Seconds the simulated thinking takes with `steps`, and the time shown if it mounts already done. |
| label | string | "Thinking" | Said while it thinks, before the timer. |
| shimmerColor | string | "" | Colour of the light that sweeps the label. The text colour when empty, which reads as a sweep of ink on light and of light on dark. |
| defaultOpen | boolean | false | Start with the full trace showing instead of the latest line. |
| onOpenChange | (open: boolean) => void | – | Called when the trace is opened or closed. |
| className | string | – | Added to the root element. |
| style | CSSProperties | – | Inline styles on the root; set --mlui-* variables here to theme it. |