Thinking Trace

Collapsible reasoning steps with a live status for each.

Thinking
  1. Read the order history (done)

    14 orders since March

  2. Compare roast preferences (done)

    Mostly light, two medium

  3. Pick three new coffees (active)

  4. Write the recommendation (pending)

import { ThinkingTrace } from '@brand-studio/ui';

export default function ThinkingTraceDemo() {
  return (
    <div style={{ width: '100%', maxWidth: 480 }}>
      <ThinkingTrace
        defaultOpen
        steps={[
          { id: 'read', title: 'Read the order history', detail: '14 orders since March', status: 'done' },
          { id: 'compare', title: 'Compare roast preferences', detail: 'Mostly light, two medium', status: 'done' },
          { id: 'pick', title: 'Pick three new coffees', status: 'active' },
          { id: 'write', title: 'Write the recommendation', status: 'pending' },
        ]}
      />
    </div>
  );
}

Installation

pnpm add @brand-studio/ui

Usage

import { ThinkingTrace } from '@brand-studio/ui';
<ThinkingTrace
  steps={[
    { id: 'read', title: 'Read the order history', status: 'done' },
    { id: 'pick', title: 'Pick three coffees', status: 'active' },
  ]}
/>

Examples

Finished

When no step is active, the summary counts the steps and the trace starts closed.

Thought through 3 steps
  1. Read the order history (done)

  2. Compare roast preferences (done)

  3. Pick three new coffees (done)

import { ThinkingTrace } from '@brand-studio/ui';

export default function ThinkingTraceFinished() {
  return (
    <div style={{ width: '100%', maxWidth: 480 }}>
      <ThinkingTrace
        steps={[
          { id: 'read', title: 'Read the order history', status: 'done' },
          { id: 'compare', title: 'Compare roast preferences', status: 'done' },
          { id: 'pick', title: 'Pick three new coffees', status: 'done' },
        ]}
      />
    </div>
  );
}

Accessibility

  • Built on <details>, so it opens with Enter or Space and works before JavaScript loads.
  • Each step's status is spelled out for screen readers.

API Reference

PropTypeDefault
stepsTraceStep[]
title?string
defaultOpen?booleanfalse
className?string''

Still, Deskhand and Hollis are fictional brands. The coffee photographs are original generated artwork. @brand-studio/ui is MIT licensed.