Activity
Says what the agent is doing now.
Sizes
- Searching docs
defaultdefault
- Searching docs
sm
Group
closed
- Read refund-policy.mdLooked up ord_4812
open
Step
running
done
fail
stopped
States
waiting
- Refunding ord_4812
active
- Refunded 3 orders, ran an evalRefunded 3 orders, ran an eval
done
- Refunded 3 ordersRefunded 3 orders, with a warning
warned
- Refunded 2 ordersRefunded 2 orders, failed
failed
- StoppedStopped
stopped
hover
Usage
When to use it
- Use
- A product without a thread shows one live line for an agent: "Searching docs", then "Searched docs".
- Use
- The first wait of a turn needs a loader that never flashes for a fast reply.
- Use
- A summary line should fold rows that came before.
- Not for
- The calls themselves, with their output. Use Tool call.
- Not for
- Where a piece of work stands in a list or table. Use Status.
Rules
6 rules
- Must
- Write label as an -ing verb and its object, and pass active while the work runs. Because the done line is its past tense, so "Searching docs" settles into "Searched docs"; a noun has no past tense.
- Must
- Use waiting for the first gap of a turn, before any token, reasoning or call. Because it waits 150ms before it shows and holds 400ms once shown, so a fast reply never flashes a loader.
- Should
- Feed it from a turn's calls with toolActivity(calls) rather than hand-picking a phrase. Because it follows the newest running call, never headlines a failure, and settles on a summary like "Edited 3 files, 1 failed".
- Must
- Pass status="warn" or "fail" when the work ended badly; never colour the label yourself. Because the word in its status colour is what survives grayscale, forced colours and a screen reader.
- Should
- Set announce={false} inside a Conversation. Because the thread announces the turn's end itself, and two regions read the same news twice.
- Never
- Add a spinner or animated dots of your own; the pending arc is the only loop. Because Glaze has one loop, and it stands still under reduced motion while the word still says running.
State order
3 states, highest first
- 1
- waiting
- 2
- active
- 3
- done
Accessibility
4 checks
- One polite status region reads the loader's label and the settled phrase; live phrases are not read.
- The arc is aria-hidden; aria-busy is set while waiting or active.
- Warn and fail add their word, never colour alone.
- An ActivityGroup line is a button with aria-expanded.
Edge cases
5 edge cases
- A burst of phrases
- Each holds 1s; ones that arrive in between are skipped.
- A tool ends and the next starts
- The 400ms settle reads them as one live line.
- Reply in 80ms
- The loader never shows.
- Summary already says "1 stopped"
- The end word is not read twice.
- Reduced motion
- The arc stands still.
API
10 props
labelstringactivebooleandefaultfalsewaitingbooleandefaultfalsedoneLabelstringdefaultpast tense of labelstatus'ok' | 'warn' | 'fail' | 'stopped'default'ok'size'default' | 'sm'default'default'minDisplay, settle, delay, minLoadernumberdefault1000, 400, 150, 400announcebooleandefaulttrueActivityGroup summary, meta, live, sizeReactNode, ReactNode, booleanStepGlyph state'running' | 'done' | 'fail' | 'stopped'
Tokens
13 tokens
--type-label- 500 13px/1.35 var(--font-sans)
--type-body-sm- 400 13px/1.5 var(--font-sans)
--text-1- rgb(5 5 5 / 0.80)
--text-2- rgb(5 5 5 / 0.60)
--text-3- rgb(5 5 5 / 0.45)
--fail-text- #b23c29
--warn-text- #8a5a00
--hover- rgb(5 5 5 / 0.06)
--radius-tag- 6px
--control- 32px
--dur-spin- 800ms
--wait-show- 150ms
--wait-hold- 400ms