Agent status

Free

A run's live state in a pill, queued, running, waiting on you, done, failed or stopped, that fills as it goes and closes into its result.

npx shadcn@latest add https://pixilui.com/r/agent-status.json

Preview

A run's status fills as it goes and closes into its result, so it never jumps.
State
Size
Variant

When to use

Use it when

  • Run lists, tables, tool call logs and run headers: anywhere a run, task or tool call has a live state.
  • Running with a known share done: pass progress and meta ("42%").
  • A finished run with its time: state="done" meta="2:14".

Use something else when

  • A state that never changes: write plain text.
  • Tight places with words beside it already (logs, table cells): use Status dot, the same node without the pill.
  • Warnings and errors about a form: use the field's message.

Installation

Terminal
npx shadcn@latest add https://pixilui.com/r/agent-status.json

Adds agent-status.tsx, and installs clsx and tailwind-merge. The URL works in any app with a components.json, with no registry to add first.

Usage

example.tsx
import { AgentStatus } from "@/components/pixilui/agent-status";

<AgentStatus state={state} />

Sizes sm 24, md 30 (the chip size), lg 32; inline is a 28 row. The pill is as wide as its words and never wraps.

API reference

PropTypeDefault
stateRequired"queued" | "running" | "waiting" | "done" | "failed" | "stopped"–The run's state. Changing it plays the change: the color first, then the shape and the words.
labelstring–The words, when they are not the state's own ("Refunded", "Needs you"). Changing them plays the quiet swap.
labelsPartial<Record<AgentStatusState, string>>–The words for each state, for translation. Defaults to AgentStatusLabels.
metastring–A second tone after the words: a share ("42%") or a time ("2:14"). Tabular figures.
progressnumber | null–Share done, 0 to 100. Running and waiting draw an arc at it; running without it is a plain spinner.
size"sm" | "md" | "lg""md"sm 24, md 30 (the chip size, default), lg 32.
variant"badge" | "inline""badge"badge, the pill (default), or inline: the mark and words with no pill.

Also takes every native <span> attribute, and a ref.

Keyboard

TabNever takes focus: the pill is not interactive. The control it sits in owns focus.

Accessibility

  • The root is role="status", so a change of words is announced politely; the mark is aria-hidden and the words carry the meaning.
  • Color is never the only signal: each state has its own words and its own mark shape (dashes, arc, check, exclamation, square).
  • All words pass 4.5:1 on their pill in light and dark, and on the surface inline.

Motion

  • The tint, words and mark change color first (150ms), then the shape carries on from where it was.
  • Words swap quietly: the old fade out with a 2px blur, the new rise 2px as their blur melts, 60ms later; the width follows over 260ms, opening first when it grows and waiting when it narrows.
  • Leaving running, the spinner keeps its angle and slows to a stop while the ring closes; done and failed fill the ring inward, then the check or exclamation draws. Done sends one glint across the pill; failed shakes once.
  • Running repeats a glint every 2.4s with a light band through the words; waiting breathes a halo. Nothing plays on first render.
  • Reduced motion: no loops, results drawn, words swapped at once.

PixilUI Pro opens soon. The first 20 licenses are $99.