Dashral Pro is on the wayGet 30% off at launch

Dashral

Tool Activity

The tools an AI assistant used to get its answer, step by step: their status, how long they took, and their input and output.

$ pnpm dlx shadcn@latest add https://dashral.com/r/tool-activity.json
How did sales do in October?
  1. Search orders: Running
  2. Compare with September: Waiting
    Compare with September
  3. Find the biggest change: Waiting
    Find the biggest change

Installation

$ pnpm dlx shadcn@latest add https://dashral.com/r/tool-activity.json

Adds the component, the components it builds on, its npm packages and the theme tokens it uses. Using Dashral often? Add the registry to components.json once:

components.json
{
  "registries": {
    "@dashral": "https://dashral.com/r/{name}.json"
  }
}

Then add components by name:

$ pnpm dlx shadcn@latest add @dashral/tool-activity

Usage

example.tsx
import { ToolActivity } from "@/components/dashral/tool-activity"

<ToolActivity
  steps={[
    { name: "Search orders", status: "done", duration: 820, output: { found: 96 } },
    { name: "Sum revenue", status: "running" },
  ]}
/>

Examples

Every state

Done (opened to its input and output), failed with the reason, running and waiting.

  1. Read invoice #1042: Done
    Input
    {
      "invoice": "INV-1042"
    }
    Output
    {
      "customer": "Northwind",
      "amount": 1240,
      "currency": "USD",
      "due": "2026-10-02",
      "paid": false
    }
  2. Send a payment reminder: Failed
  3. Look up the new billing contact: Running
    Look up the new billing contact
  4. Send the reminder again: Waiting
    Send the reminder again

API reference

ToolActivity

Also takes every prop of <ol>(opens in a new tab).

PropTypeDefault
stepsToolStep[]

The tool calls in the order they ran. Required.

—
aria-labelstring

Names the list.

"Tool activity"
classNames{ step?, trigger?, details?, code? }

Classes for each part.

—
classNamestring

Extra classes, merged with cn() so yours win.

—

ToolStep

PropTypeDefault
nameReactNode

What the tool did, in words. Required.

—
status"pending" | "running" | "done" | "error"

Required. Shown as an icon and heard as a word.

—
descriptionReactNode

A line under the name: what it found, or why it failed.

—
input / outputunknown

Objects show as JSON, text as it is, an element rendered. Either one makes the step open.

—
durationnumber

Milliseconds, written in the locale's units (820 ms, 1.2 s).

—
iconReactNode

Replaces the status icon.

—
defaultOpenboolean

Open to its input and output from the start.

false
idstring

A stable key when names repeat.

—

Keyboard

KeysAction
TabThe steps with details
EnterorSpaceOpen or fold a step's input and output

Accessibility

  • An ordered list, named Tool activity; each step's status is a word as well as an icon and a color.
  • As a step changes, a polite live region says it ("Search orders: done"), not the whole list again.
  • A step with details is a button that says whether it's open (aria-expanded).

Motion

  • A running step's spinner turns, and stands still with reduced motion. Details open and fold over --duration-standard.