Components / AI interface
TaskRows
Live agent task status — running, failed, completed.
Install
npx shadcn@latest add https://irisui.dev/r/task-rows.jsonimport TaskRows from "@/components/iris/task-rows/task-rows";
Preview
TaskRows
Live status rows for agent tasks — completed, running with a step spinner, failed with retry — each expandable to show its sub-steps.
When to use
- Show a handful of background agent tasks and their status in a reply or a side panel.
- Use
Capsules(separate floating rows) in open layouts andList(one bordered card with dividers) inside denser panels. - Not for a single indeterminate wait — use
LoadingState. Not for a reasoning or tool trace — useThinkingStateorToolChips. Not for user-facing onboarding steps — useOnboardingChecklistorStepper.
Usage
import TaskRows from "@/components/iris/task-rows/task-rows";
h(TaskRows, {
variant: "List",
rows: [
{
key: "verify",
label: "Checked open tasks",
amount: "38 tasks",
status: "done",
details: [{ label: "Matched owners", meta: "38/38" }],
},
{
key: "index",
label: "Index the project",
amount: "214 documents",
status: "running",
step: 2,
details: [{ label: "Building semantic search", meta: "68%" }],
},
],
onToggleRow: (key, open) => log(key, open),
});
Props
| Prop | Type | Default | Description |
|---|---|---|---|
variant |
"Capsules" | "List" |
"Capsules" |
Row styling. |
rows |
{ key: string; label: string; amount: string; status: "done" | "running" | "sequence"; step?: number; details: { label: string; meta: string }[] }[] |
3 CapyDB upkeep tasks | done shows a green check and a Completed pill, and running shows a spinning ring with step. sequence plays pending → Failed (with retry) → Completed on a fixed timer. details appear when a row is expanded. |
labels |
Partial<{ completed: string; failed: string }> |
Completed / Failed |
Pill text. |
className |
string |
— | Extra classes on the outer column (max 440px wide). |
onToggleRow |
(key: string, open: boolean) => void |
— | Called when a person expands or collapses a row. |
Notes
- The status run is a fixed demo timeline that plays once. The row whose
keyis"index"auto-expands between about 1.5s and 3.9s, andsequencerows resolve at about 5.3s. Status isn't driven by props, so for live data, map each task todoneorrunningand re-render. - Each row header is a button with
aria-expandedthat toggles its details. The chevron isaria-hidden. - Reads
--surface,--inset,--line,--ink,--ink-3,--green/--green-tintand--red/--red-tint, plusshadow-card.