Task
A collapsible step with a status, for showing what an agent did and which files it touched.
Read 58 components across two families
Matched the request tobutton.tsxandfield.tsx
Wrote the demo and regenerated the registry
Installation
pnpm dlx nachui add taskAnatomy
A task opens by default, because the interesting part of an agent run is usually the step it is on. Set
defaultOpen={false} on the ones that already finished.Composition
Use the following composition to build a
Task:Statuses
status drives the icon and its colour: pending waits, active spins, complete checks off and error flags. Stack several tasks to make a run readable at a glance.Writingprompt-input.tsx
2 errors in the generated registry
API Reference
Task
| Prop | Type | Default | Description |
|---|---|---|---|
defaultOpen | boolean | true | Open state when uncontrolled |
open | boolean | - | Controlled open state |
onOpenChange | (open: boolean) => void | - | Called when the open state change |
className | string | - | Additional CSS classes |
Task.Trigger
| Prop | Type | Default | Description |
|---|---|---|---|
title | string | - | Label of the step |
status | 'pending' | 'active' | 'complete' | 'error' | 'complete' | Icon and colour of the indicator |
children | ReactNode | - | Replaces the title when given |
className | string | - | Additional CSS classes |
Task.Content
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | - | Additional CSS classes |
Task.Item
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | - | Additional CSS classes |
Task.File
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | - | Additional CSS classes |
Found something to improve?
Notice a bug, typo, or missing detail on this page? Help us make the documentation better by opening a GitHub issue.