ReasoningTrace
A collapsible streaming reasoning trace.
Install
npx shadcn@latest add https://crate.onerollstudios.com/r/reasoning-trace.jsonPlayground
The user wants a loading state for a chat. I should check which components fit before suggesting one.
<ReasoningTrace
text="The user wants a loading state for a chat. I should check which components fit before suggesting one."
/>Import
import { ReasoningTrace } from "@/components/agent-wait-states/reasoning-trace";Props
| Prop | Type | Required | Default | Notes |
|---|---|---|---|---|
className | string | no | ||
accent | boolean | no | false | |
labels | Partial<CrateLabels> | no | Replace any of this component's labels. Overrides CrateProvider. | |
text | string | no | "" | |
done | boolean | no | false | |
durationSeconds | number | no | ||
defaultOpen | boolean | no |
Labels
Override with the labels prop or a CrateProvider.
| Label | English default |
|---|---|
showThinking | "Show thinking" |
thoughtDone | "Done thinking" |
thoughtFor | (seconds, f) => `Thought for ${f.seconds(seconds)}` |
reasoningPlaceholder | "Working through the details…" |
Example
<ReasoningTrace text={reasoning} done={finished} durationSeconds={12} accent />For coding agents: /llms/reasoning-trace.md, generated from the same source.