Reasoning
While the model works, the trigger names the current step, counts the seconds, and opens the trace. When it finishes, the label settles into a short summary like Worked for 6s, and the trail stays one tap away.
- Compared the incident with recent deployments The errors start two minutes after the last production deploy.
- Filtered payment errors by issuer country Only non-US cards fail, so the regression sits in address verification.
- Matching the first failing request The first failure lines up with the providerโs new verification rule.
Installation
Copy the command below and run it in your terminal.
Usage
Live reasoning
Set streaming on Root while the model works. The trace opens and the elapsed seconds count up. Pass
the current activity as status on Trigger; it defaults to Thinking.
When streaming turns off, the trace stays as it is and the trigger reads Worked for and the
elapsed time, or your summary. Bind open to control visibility yourself.
Steps
Compose Steps and Step inside Content for a trail joined by a rail. An active step shimmers its title, an icon snippet replaces the dot, and collapsible turns the title into a toggle for the body.
Trigger icon
The trigger shows no icon by default. Pass an icon snippet to render one before the label. It receives the trigger state, so Orb can fill while streaming is on, or you can render any 14px icon.
Restored transcripts
The trigger measures elapsed time while streaming is on. For a saved conversation, pass the recorded duration in seconds on Root instead.
Examples
Live reasoning
- Reading the release history
Searched sources
- Checking response-time limits
People notice a delay after about a second, so several seconds of reasoning needs feedback that changes.
Anatomy
Reasoning.Root - Holds the open and streaming state and measures elapsed time.
Reasoning.Trigger - Shows an optional icon, the live status, and timer, then the settled summary.
Reasoning.Orb - A liquid orb for the trigger icon that waves while active.
Reasoning.Content - Holds the reasoning trace.
Reasoning.Steps - Lists the steps of the trace.
Reasoning.Step - Shows one step with its icon, title, and body on a connecting rail.
<script lang="ts"> import * as Reasoning from '@sivir-ui/svelte/components/reasoning'; </script> <Reasoning.Root duration={6} open class="w-full max-w-xl"> <Reasoning.Trigger status="Matching the first failing request" /> <Reasoning.Content> <Reasoning.Steps> <Reasoning.Step title="Compared the incident with recent deployments"> The errors start two minutes after the last production deploy. </Reasoning.Step> <Reasoning.Step title="Filtered payment errors by issuer country"> Only non-US cards fail, so the regression sits in address verification. </Reasoning.Step> <Reasoning.Step title="Matching the first failing request"> The first failure lines up with the providerโs new verification rule. </Reasoning.Step> </Reasoning.Steps> </Reasoning.Content> </Reasoning.Root>