Activity Item
ProOne line of a live activity stream: a status dot, what is happening, the tool behind it and how long it took.
Playground
Installation
Activity Item comes with WunderUI Core and Pro, in the package from your plan. See the plans.
Then import what you need:
import { ActivityItem } from "@wunderui/react"Then use it:
import { ActivityItem } from "@wunderui/react"
export function Action() {
return (
<ActivityItem
status="done"
label="Read 214 variables from Figma"
tool="figma.read"
elapsed="3.6s"
/>
)
}Expected result: You should see a green dot, the label, a light indigo pill reading figma.read and 3.6s at the right edge. Set the status to running and the dot turns indigo and pulses.
When to use
Use Activity Item for
- One line in the live stream of what an agent is doing, with the tool and the time
- A feed of short events, grouped by day, where one line per event is enough
- A row that counts up while an action runs and settles on its duration
Use something else for
- Run Timeline for the steps of a run with their output, duration and detail behind a disclosure
- Agent Plan for a plan shown as a checklist before and while it runs
- Log Stream for the raw timestamped lines a run writes, with a filter and auto-scroll
Tool
The tool chip names what the action runs on: a tool, a file or the kind of an event. It's optional, and a name longer than 160 px is cut off with an ellipsis.
Time
The right-hand cell shows the elapsed text you pass, and while running a start time makes it count up. When the action ends, pass the measured duration, or the cell shows a dash.
Label
A long label is cut off with an ellipsis. Let it wrap where the full text matters, and build the label from parts when it needs an actor and a target.
Queued and clickable
queued is an action that has not started yet, with a hollow dot. With onClick the whole row becomes a button with a hover state and a focus ring, for opening the step or jumping to the tool call.
Behavior and motion
What the row does with its status, its time cell, assistive technology and motion.
- Structure
- A plain div: no list item, no role, no focus. The list, headings and live region around it are yours, and a data attribute mirrors the status for styling.
- Status
- Each status has its own dot and a hidden word, so a screen reader reads Failed: Push to docs-preview timed out. On screen only the dot differs, so write the failure into the label too.
- Counter
- A running row with a start time counts up every 100 ms (6.3s, then 1m 04s) and starts after first paint. When the status changes it shows the elapsed time, or a dash.
- Live region
- The row announces nothing itself. Keep it out of log regions because the counter changes ten times a second, and announce start, finish and failure in one status line beside the list.
- Long content
- The label ends in an ellipsis unless it wraps, and has no tooltip. The tool chip is cut at 160 px, and the time cell never shrinks, so a long label gives way first.
- Failure and stop
- Failed is the one error state. There is no cancelled status: show a stopped step as failed with a label that says so, and unstarted steps as waiting with not started in the label.
- States
- The row is not interactive. It has no hover, focus or pressed style and no tab stop.
- Motion
- Only the running dot moves: it pulses in opacity. The counter is text.
- Reduced motion
- With reduced motion on, the dot stands still. The counter keeps counting because it is information.
Anatomy
The figure marks a finished row. The hidden status text has no box on screen, so it has no number.
- data-slot="activity-item"
One row in a feed. It is not a list item, a live region or a tab stop, so put it in a list item of your own.
- 1
An 8 px dot, hidden from assistive technology. Indigo and pulsing while running, green when done, red when failed, grey when waiting.
- 2
The label, 14 px, in the free width. It ends in an ellipsis or wraps if you ask, and a waiting row has a tertiary label.
- 3Optional
A light indigo pill with the tool name, up to 160 px wide. It shows only when a tool is set.
- 4
12 px tertiary text with tabular numbers: the running counter, else the elapsed time, else a dash. It never shrinks.
The status word plus a colon, as hidden text before the label. It is the only place a screen reader gets the status.
Best practices
- Do
Put rows in a list, one list item each. A screen reader then counts them, and a feed grouped by day gets a heading and a list per group.
- Do
Say the failure in the label, like Push to docs-preview timed out. On screen only the dot's colour tells Done from Failed, and colour alone is not enough.
- Do
Give a running row a start time, and pass the measured duration when it ends. The counter stops with the status, and without a duration the cell shows a dash.
- Do
Announce changes from one status line next to the list, not from the rows. Mount the line before it has text.
- Do
Let the label wrap where the whole text matters. A cut-off label has no tooltip.
- Don’t
Don't use it as a button or link. The row has no hover, focus or press style and no tab stop; use Run Timeline for steps that open.
- Don’t
Don't put a running row inside a log or other live region. The counter changes ten times a second.
- Don’t
Don't expect a cancelled state. Show a stopped step as failed with a label that says so, and steps that never started as waiting with not started in the label.
- Don’t
Don't pass HTML strings or untrusted markup as the label. Tool and file names come from outside, so render them as text.
API reference
ActivityItem is a plain component, so the table lists every prop.
One row in a feed. It is not a list item, a live region or a tab stop, so put it in a list item of your own.
| Prop | Type | Default | Description |
|---|---|---|---|
| status required | "running" | "done" | "queued" | "failed" | "waiting" | — | pulses and counts up from , and end the action, has not started and waits for something, is lined up behind others (hollow dot). There is no cancelled status. The status word is also written as hidden text before the label. |
| label required | ReactNode | — | What the action is, as text or parts (an actor, a verb, a target). It ends in an ellipsis unless is set. |
| tool | ReactNode | — | The tool, file or kind of event, as a light indigo pill. At most 160 px wide with an ellipsis. Left out, there is no chip. |
| elapsed | ReactNode | — | The text of the time cell, already formatted (, ), or an element such as a . Shown when no counter runs; a dash when empty. |
| since | Date | string | number | — | When the action began, as a , a timestamp or a date string. A row counts up from it every 100 ms; for any other status it is ignored. |
| wrap | boolean | false | Lets a long label break onto more lines instead of ending in an ellipsis. Default . |
| onClick | () => void | — | Makes the row a button, with hover, pressed and focus states. Without it the row is a plain . |
| aria-label | string | — | The spoken name of the button, for example "Start Write the changelog". Only used together with . |
| className | string | — | Extra classes for the row, for example or a margin. |
Notes for AI
Give your coding assistant the Markdown reference instead of screenshots.
get_component("activity-item")The full library index for assistants is at /llms.txt.
Related components
- Done420 tok$0.01640ms
Input
status: overdue, age: 30+ daysOutput
14 invoices, $42,860 in total - Done3,420 tok$0.042.1s
Input
14 invoice idsOutput
14 contacts, all with an email address - Running2,310 tok
Input
template: invoice-overdue-30 - Pending
Input
to: 14 recipients - PendingLog the result
AI & Agents5 stylesProRun TimelineEvery step of a run in order, with duration, tokens and expandable input/output.Run log
0:00.0InfoRun started: sync 214 Figma variables0:01.4InfoRead 214 variables from Figma0:05.2WarnFigma API busy, retrying in 2 s0:09.8InfoBound 96 of 214 variables0:12.0ErrorPush to docs-preview timed out after 30 s0:12.1ErrorRun failed at step 4 of 6. 118 variables were not bound.AI & Agents5 stylesProLog StreamA run's log with an All or Errors filter and auto-scroll.Ship the Tabs v2 release
2 of 7 done
- Read the migration notesDone1m 12s
- Audit contrast on the docs siteDone0:48
- Sync tokens from FigmaRunning—
Rewriting the variant map so legacy props keep resolving after the rename.
Targetpackages/react/tabs.tsx·Estimate4 min
- 4Update the token mapQueued—
- 5Run the test suiteQueued—
- 6Publish to npmQueued—
- 7Notify the release channelQueued—
AI & Agents4 stylesProAgent PlanThe agent's plan as a checklist: follow it live, edit it before the run, or group it into phases.