Component reference
TaskList
An ordered plan of host-reported steps that an agent works through.
Preview
A plan an agent works through
The host reports each step's state; the list shows the plan, the current step and how many are done. Rows keep their place by id while states move on.
render() {
const current = signal(1);
const items = signal(plan(1, 4));
const advance = () => {
current.value = Math.min(current.value + 1, steps.length);
items.value = plan(current.value, current.value < steps.length ? 0 : undefined);
};
return (
<Specimens>
<Specimen label="In progress" width="narrow">
<TaskList items={items} />
<ActionRow>
<Button size="small" variant="outline" data-task-advance onClick={advance}>
Finish current step
</Button>
<Button
size="small"
variant="quiet"
onClick={() => {
current.value = 1;
items.value = plan(1, 4);
}}
>
Reset
</Button>
</ActionRow>
</Specimen>
<Specimen
label="Every state"
note="Waiting needs someone; failed and canceled steps keep their place in the plan."
width="narrow"
>
<TaskList
title="Release checks"
items={[
{ id: "a", label: "Run the test suite", state: "success" },
{ id: "b", label: "Approve the migration", state: "waiting" },
{ id: "c", label: "Upload the source maps", state: "error" },
{ id: "d", label: "Notify the beta channel", state: "cancelled" },
{ id: "e", label: "Tag the release", state: "queued" },
]}
/>
</Specimen>
<Specimen label="Collapsed" width="narrow">
<TaskList items={plan(steps.length)} defaultOpen={false} />
</Specimen>
</Specimens>
);
}Installation
bun add meowtail
Usage
Taken from the examples on this page.
import { TaskList } from "meowtail";
<TaskList
title="Release checks"
items={[
{ id: "a", label: "Run the test suite", state: "success" },
{ id: "b", label: "Approve the migration", state: "waiting" },
{ id: "c", label: "Upload the source maps", state: "error" },
{ id: "d", label: "Notify the beta channel", state: "cancelled" },
{ id: "e", label: "Tag the release", state: "queued" },
]}
/>API reference
It is not executable and not a ChatTask record: the host owns every state, and the list only shows them. Markers, strikethrough and the shimmer are visual; each row also carries its state as text for assistive technology.
Props
| Prop | Type | Default |
|---|---|---|
title | MaybeSignal<string> | "Tasks" |
itemsRequired | MaybeSignal<readonly TaskListEntry[]> | – |
defaultOpenExpanded on mount; native details owns expansion afterwards. | boolean | true |
Also takes className, children and the attributes and events of its root element.
DOM parts
rootsummarymarkertitlecountchevronlistitemitemMarkerlabelstateprogress
Registry
The component is registered as task-list in the meowtail component registry.