Skip to content

    Browse components

    Reasoning Trace

    An AI reasoning indicator: the label ripples letter by letter, the current step shimmers past, and a click unfolds the full trace of steps.

    Open
    Customize

    Installation

    npx shadcn@latest add @glint-ui/reasoning-trace

    First time using @glint-ui? Add the registry to components.json once, or install by URL: npx shadcn@latest add https://glintui.vercel.app/r/reasoning-trace.json

    Usage

    import { ReasoningTrace } from "@/components/ui/reasoning-trace";
    
    <ReasoningTrace steps={reasoning} running={!answer} />

    Props

    PropTypeDefaultDescription
    labelstring"Thinking"Rippling label while running.
    doneLabelstring"Thought for {s}s"Label when finished; {s} becomes elapsed seconds.
    highlightstring"var(--foreground)"CSS color of the shimmer highlight.
    defaultOpenbooleanfalseStart with the steps expanded.
    stepsReactNode—Reasoning steps so far; the last is the live one.
    runningReactNode—Boolean, default true. Set false when finished to show the done label.
    classNamestring—Extra classes for the root element.