Docs / ReasoningTrace

ReasoningTrace

A collapsible streaming reasoning trace.

Install

npx shadcn@latest add https://crate.onerollstudios.com/r/reasoning-trace.json

Playground

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

PropTypeRequiredDefaultNotes
classNamestringno
accentbooleannofalse
labelsPartial<CrateLabels>noReplace any of this component's labels. Overrides CrateProvider.
textstringno""
donebooleannofalse
durationSecondsnumberno
defaultOpenbooleanno

Labels

Override with the labels prop or a CrateProvider.

LabelEnglish 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.