The one-line "assistant is working" status above a chat composer: an animated indicator, a shimmering label and an elapsed timer.
In a chat
Sits above the composer while the assistant works. The label moves through the steps and is read out politely each time; the timer keeps running across them.
Draft a proposal for Lumen Coffee's rebrand from last week's brief.
Installation
Copies the component into src/design-system/ as your own source, with only the files it needs.
npx avesk-ui@latest add agent-thinkingBrings the 1 file it builds on (glyph.tsx). The first time, it also adds the tokens and the cn() helper, imports the tokens in globals.css and installs clsx and tailwind-merge. Files already in your project are kept unless you add --force.
Import
Lives in src/design-system/components/agent-thinking.tsx.
import { AgentThinking } from "@/design-system/components/agent-thinking";Usage
<AgentThinking label="Drafting the proposal" />
<AgentThinking variant="spin" label="Reading the Lumen brief" />
<AgentThinking variant="infinity" tone="accent" showTimer={false} />Examples
Variants
wave (default): a dot grid crossed by a diagonal wave. spin: a head circling the grid. stars: twinkling sparkles (subtle tone). infinity: a comet on a figure-eight, for long work. burst: Avesk's 8-ray loader.
Label, tone and timer
label sets the status copy, showTimer toggles the elapsed seconds, shimmer the travelling highlight, and tone overrides the variant's colour. With reduced motion everything holds still.
When to use
Use it when
- The assistant is drafting a reply, proposal, invoice or brief and the wait is open-ended
- Showing which step the assistant is on ("Reading the brief", "Drafting the proposal")
- Any agent work that may take more than a second
Rules
- Keep the label short, in the present tense and specific: "Drafting the invoice", not "Please wait…"
- Change the label as the work moves on; keep the same element mounted so the timer keeps running
- Use wave (default) or spin in chat, stars for quiet background work, infinity for long runs, burst to match Avesk's other loaders
- Leave the tone to the variant; use tone="accent" only when it is the one thing on screen to watch
- Remove it when the reply arrives; never leave it running without work behind it
Properties
AgentThinking
| Prop | Type | Default |
|---|---|---|
variant | "wave" | "spin" | "stars" | "infinity" | "burst" | "wave" |
label | string | "Thinking" |
showTimer | boolean | true |
shimmer | boolean | true |
tone | "default" | "subtle" | "accent" | – |
startedAt | number | – |
className | string | – |
* required
Accessibility
- role="status" (polite live region): the label is read when it changes, without interrupting
- The ticking timer and the indicator are hidden from screen readers
- Under prefers-reduced-motion every animation stops: the indicator holds a still frame and the label is plain text
- The default tone (neutral-600) keeps the label above 4.5:1 on white and neutral-100; subtle (neutral-500) reaches it on white