Skip to content
WunderUI

Activity Item

Pro

One line of a live activity stream: a status dot, what is happening, the tool behind it and how long it took.

Playground

Running: Comparing Figma and code tokenstokens.diff6.3s

Installation

Activity Item comes with WunderUI Core and Pro, in the package from your plan. See the plans.

Then import what you need:

tsx
import { ActivityItem } from "@wunderui/react"

Then use it:

tsx
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.

Done: Read 214 variables from Figma3.6s

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.

Done: Read 214 variables from Figmafigma.read3.6s

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.

Done: Read 214 variables from Figmafigma.read3.6s

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.

Queued: Write the changelogdocs.write—

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.

Done: Read 214 variables from Figmafigma.read3.6s
  • 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.

  • An 8 px dot, hidden from assistive technology. Indigo and pulsing while running, green when done, red when failed, grey when waiting.

  • 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.

  • Optional

    A light indigo pill with the tool name, up to 160 px wide. It shows only when a tool is set.

  • 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.

PropTypeDefaultDescription
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 requiredReactNode—What the action is, as text or parts (an actor, a verb, a target). It ends in an ellipsis unless is set.
toolReactNode—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.
elapsedReactNode—The text of the time cell, already formatted (, ), or an element such as a . Shown when no counter runs; a dash when empty.
sinceDate | 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.
wrapbooleanfalseLets 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-labelstring—The spoken name of the button, for example "Start Write the changelog". Only used together with .
classNamestring—Extra classes for the row, for example or a margin.

Notes for AI

Give your coding assistant the Markdown reference instead of screenshots.

MCPget_component("activity-item")
InstallIncluded in Core and Pro

The full library index for assistants is at /llms.txt.