Component reference
ChatStatus
The connection or activity state of a conversation, as a dot and a word.
Preview
ChatStatus has no story of its own; this one draws it as part of ChatMessage.
Roles and feedback states
Fixed-state examples: online, waiting, error and generating. There is no background task or model call.
render: () => (
<div className="workshop-composition">
<div className="workshop-row">
<ChatStatus label="Ready" tone="online" />
<ChatStatus label="In progress" tone="busy" />
<ChatStatus label="Waiting for confirmation" tone="waiting" />
<ChatStatus label="Connection lost" tone="error" />
<ChatStatus label="Not started" tone="idle" />
</div>
<ChatFrame>
<ChatMessageList>
<ChatMessage role="system" author="System" timestamp="09:41">
Connected to the current project.
</ChatMessage>
<ChatMessage role="user" author="You" status="pending">
Check how the components behave on a narrow screen. (Waiting to send)
</ChatMessage>
<ChatMessage role="assistant" author="Assistant" status="streaming">
Checking the layout of buttons, inputs and dialogs…
</ChatMessage>
<ChatMessage role="tool" author="Browser check">
Opened the 390px canvas and kept the original content.
</ChatMessage>
<ChatMessage role="assistant" author="Assistant" status="error">
The connection was lost and the check did not finish. Input is still kept.
</ChatMessage>
<ChatMessage role="assistant" author="Assistant" continuation>
Checking can continue once the connection returns.
</ChatMessage>
</ChatMessageList>
</ChatFrame>
</div>
)Installation
bun add meowtail
Usage
Taken from the examples on this page.
import { ChatStatus } from "meowtail";
<ChatStatus label="Ready" tone="online" />Examples
Other stories that draw ChatStatus.
Model state, keyboard hint and send
The writing surface contains draft and bottom actions; keyboard help follows outside its rounded edge. Controls only change fixture data; the story adds no layout styles.
render() {
const draft = signal("");
const trailing = signal<Child>(<ChatStatus label="No model connected" tone="idle" />);
const attachmentsHidden = signal(true);
const helpCount = signal(0);
const sentCount = signal(0);
return (
<Measure width="content">
<Stack gap="relaxed">
<h2>Stacked composer footer</h2>
<Inline wrap gap="compact">
<Button
variant="quiet"
onClick={() => {
trailing.value = <ChatStatus label="No model connected" tone="idle" />;
}}
>
Disconnected model
</Button>
<Button
variant="quiet"
onClick={() => {
trailing.value = (
<ChatStatus
label="No model connection is available for the currently selected workspace and provider profile"
tone="waiting"
/>
);
}}
>
Long status
</Button>
<Button
variant="quiet"
onClick={() => {
trailing.value = (
<ChoiceSelect
aria-label="Model"
defaultValue="long"
options={[
{
value: "long",
label:
"AnUnbrokenProviderAndModelIdentifierThatStillNeedsAReachableSelector",
},
]}
placement="top"
/>
);
}}
>
Long model name
</Button>
<Button
variant="quiet"
onClick={() => {
attachmentsHidden.value = !attachmentsHidden.value;
}}
>
Toggle attachments
</Button>
</Inline>
<ChatComposer
value={draft}
inputLabel="Footer draft"
hintId="stacked-footer-hint"
hint={[
"Enter for a new line · Use Send to submit. ",
<a
href="#footer-help"
onClick={(event: MouseEvent) => {
event.preventDefault();
helpCount.value++;
}}
>
Keyboard help
</a>,
]}
trailing={trailing}
attachments={
<div hidden={attachmentsHidden}>
<ChatAttachments
items={[
{
id: "notes",
name: "footer-notes.md",
mediaType: "text/markdown",
url: "data:text/plain,Local%20fixture",
},
]}
/>
</div>
}
onInput={(event) => {
draft.value = (event.currentTarget as HTMLTextAreaElement).value;
}}
onSubmit={(event) => {
event.preventDefault();
sentCount.value++;
}}
submitLabel="Send draft"
>
<IconButton label="Attach files">
<Icon name="plus" />
</IconButton>
</ChatComposer>
<p id="footer-help">
Help opened: {helpCount}. Submissions: {sentCount}.
</p>
</Stack>
</Measure>
);
}Status and actions
render: () => (
<Stack>
<ChatHeader title="Assistant" />
<ChatHeader
eyebrow="Current project"
title="Review the component's text, icons, dark surfaces, and narrow-screen interactions"
description="Keeps the work context; status and actions wrap naturally on narrow screens."
status={<ChatStatus tone="busy" label="Processing" />}
actions={
<Button variant="outline" size="small">
Stop
</Button>
}
/>
<ChatHeader
title="Waiting for your decision"
status={<ChatStatus tone="waiting" label="Waiting for confirmation" />}
actions={<Button size="small">View request</Button>}
/>
</Stack>
)API reference
Props
| Prop | Type | Default |
|---|---|---|
tone | "online" | "busy" | "waiting" | "error" | "idle" | "idle" |
labelRequired | string | – |
Also takes className, children and the attributes and events of its root element.
DOM parts
rootdotlabel
Registry
The component is registered as chat-status in the meowtail component registry.