Component reference
WorkCard
A work reference inside a conversation: one control that opens the work's details.
Preview
Task entry in a conversation
A work card is the entry point for one piece of work in a conversation: the title keeps the wording from when it was published, the status line explains current progress, and the whole card opens details. Only a completed goal uses a solid dot; a returned run stays hollow.
render() {
const opened = signal("Not opened yet");
const open = (name: string) => () => {
opened.value = `Opened: ${name}`;
};
return (
<SchemePair width={480}>
{() => (
<div style={{ display: "grid", gap: "12px" }}>
<WorkCard
title="Organize notes from the workflow prototype trial"
state="processing"
status="In progress: reviewing the record format"
detail="1 outcome linked"
onClick={open("prototype notes")}
/>
<WorkCard
title="Complete the release notes"
state="returned"
status="Backend returned · awaiting a public reply"
onClick={open("release notes")}
/>
<WorkCard
title="Verify the Kimi provider trial results"
state="warning"
status="Waiting for your answer"
icon={<Icon name="list-checks" />}
onClick={open("Kimi")}
/>
<WorkCard
title="Migrate the old Notes data while keeping all history and attachments, and remove the interfaces and configuration items that have already been replaced"
state="success"
status="Goal completed"
onClick={open("migration")}
/>
<WorkCard
title="A goal that has not started"
state="unknown"
status="Goal registered"
action="View work"
onClick={open("registration")}
/>
<p style={{ margin: 0, fontSize: "12.5px", color: "var(--ui-ink-tertiary)" }}>
{opened}
</p>
</div>
)}
</SchemePair>
);
}Installation
bun add meowtail
Usage
Taken from the examples on this page.
import { WorkCard } from "meowtail";
<WorkCard
title="Organize notes from the workflow prototype trial"
state="processing"
status="In progress: reviewing the record format"
detail="1 outcome linked"
onClick={open("prototype notes")}
/>API reference
Props
| Prop | Type | Default |
|---|---|---|
titleRequired | Child | – |
stateWhat the dot says; the words in status stay the source of truth. | MaybeSignal<StatusDotState> | "unknown" |
statusCurrent status in words, for example "In progress: reviewing the record format". | Child | – |
detailA quiet extra fact after the status, for example "1 outcome linked". | Child | – |
icon | Child | – |
actionLabel of the open affordance; the whole card is the control. | Child | "Details" |
Also takes className, children and the attributes and events of its root element.
DOM parts
rooticoncopytitlestatusstatusTextdetailaction
Registry
The component is registered as work-card in the meowtail component registry.