Skip to content
pandacoderz/ui

Steps

Vertical timeline for agent plans and multi-step runs, with status indicators and collapsible details.

  1. Read the failing test
    1.2s

    Opened prompt-input.test.tsx and located the Enter handler assertion.

  2. Patch the submit handler
    running

    Reading from the event target instead of the stale prop.

    - onSubmit?.(value);
    + onSubmit?.(e.currentTarget.value);
  3. Run the full test suite

    Needs your approval before executing commands.

  4. Open a pull request

Installation

npx shadcn@latest add https://ui.spencerwueste.com/r/steps.json

Usage

import {
  Step,
  StepBody,
  StepDescription,
  StepDetails,
  StepHeader,
  StepIndicator,
  StepMeta,
  StepTitle,
  Steps,
} from "@/components/pandacoderz-ui/steps";
<Steps>
  <Step status="completed">
    <StepIndicator />
    <StepBody>
      <StepHeader>
        <StepTitle>Read the failing test</StepTitle>
        <StepMeta>1.2s</StepMeta>
      </StepHeader>
      <StepDescription>Located the Enter handler assertion.</StepDescription>
    </StepBody>
  </Step>
  <Step status="running" isLast>
    <StepIndicator />
    <StepBody>
      <StepHeader><StepTitle>Patch the handler</StepTitle></StepHeader>
      <StepDetails label="Show diff">{/* logs, tool calls, code */}</StepDetails>
    </StepBody>
  </Step>
</Steps>

The waiting status is for human-in-the-loop gates. Render your approve and reject buttons inside StepBody.

API Reference

Step

Prop Type Description
status "pending" | "running" | "completed" | "error" | "waiting" Drives the indicator icon and colors.
isLast boolean Hides the connector line below this step.

StepIndicator

Renders the status icon. Pass children to override it (a number, an avatar).

StepDetails

Prop Type Description
label string Trigger text. Default "Details".
defaultOpen boolean Initial expanded state.