Modal
Dismissible overlay for short tasks, forms, or extra detail.
Assistant panel with a header, a thread and a composer.
Assistant panel with a header, a thread, and a composer. Answers can carry figures, a table, a chart, sources and follow-ups. Not Modal.
Live panel. Pick a suggestion: the steps run, then the answer lands with figures, a table and a chart.
Good morning, Ada
Ask about this dashboard. I answer from the data on screen.
Use Chat for an inline assistant panel. With no messages, greeting, intro, suggestion rows and recents fill the panel. While it works, thinkingSteps shows the steps and onStop turns Send into Stop. Close clears the demo.
Assistant panel with a header, a thread, and a composer. Answers can carry figures, a table, a chart, sources and follow-ups. One piece.
import { Chat } from "agentic-ds-kit";From contracts/chat.json: must is the a11y requirements, defaults the prop defaults, stops if the doNot rules where the agent asks instead of inventing a cousin.
| Name | Type | Required | Default | Notes |
|---|---|---|---|---|
| title | string | No | Assistant | — |
| status | string | No | — | — |
| messages | array | No | — | ChatMessage[] with role user | assistant, content, optional id and timestamp. Type only — not a ChatMessage component. Assistant messages may add parts (ChatPart[], drawn in order under the text: metrics → kit Scorecard sm, table → kit Table sm with footer, chart → kit LineChart area as a sparkline (no Table toggle), sources → footer line, followups → kit Button sm outline pill that sends its text, plan → kit AgentPlan at the message's full width with maxVisibleSteps 3, stickyFooter and approvalLinks unless the plan says otherwise), steps (ChatStep[], collapsed into one "3 steps · 2.4s" row that opens the list), status (streaming | error) and error ({ title, description?, onRetry?, onCopyDetails? }). streaming shows a caret and a Skeleton for parts still coming; error shows a card with a warning icon, a soft primary Retry and an outline Copy details. While the newest draft plan with onAccept has its footer out of the thread's view, a kit Button sm soft primary pill above the composer (KitLabels chatPlanWaiting, "Plan waiting for approval", with an arrow toward the plan) scrolls the thread to the footer and focuses Accept. |
| suggestions | array | No | — | Prompts that send their text. Plain strings are kit Buttons sm above the composer. Objects { label, hint?, icon? } are rows (kit LinkList) in the empty state. |
| suggestionLayout | list | grid | No | list | How object suggestions show in the guided empty state. list: kit LinkList rows with the hint. grid: kit Button sm outline neutral with the suggestion icon, block width, two columns when each gets at least space-16 * 4 and stacked below that; labels wrap to a second line, the hint is not shown, and the Suggested label is a plain caption. Both send their label. While loading, grid shows four control-height Skeletons in the same grid. |
| context | object | No | — | What the next message is about, like the card and period a user asked from. A kit Tag sm above the composer; removable when onRemove is set. The composer input is described by it ("Asking about <label>"). |
| placeholder | string | No | How can we help you? | Default "How can we help you?", or "Available when your data loads" while loading. |
| emptyState | string | No | Start a conversation. | — |
| greeting | string | No | — | Empty state heading, like "Good morning, Ada". Turns on the guided empty state. |
| intro | string | No | — | Empty state line under the greeting: what the assistant can do here. With context, the context Tag moves under it. |
| summary | string | No | — | Empty state line under the intro in Geist Mono (caption, tabular figures): the key figures the assistant reads, like "October MRR $184,320 -3.1% vs September". Plain text. |
| composerLabel | string | No | — | Visible label above the composer input (kit Field label look); it names the input instead of the placeholder. In the guided empty state the labelled composer sits under the greeting block, above the suggestions (label, input and suggestions 8 and 16 apart, 32 under the greeting). Once the thread has messages the composer is at the foot. |
| recent | array | No | — | Recent questions at the foot of the empty state. kit ListView sm. Picking a row runs onSelect, or sends its label through onSend when onSelect is unset, like a suggestion. |
| recentEmptyLabel | string | No | — | Shown under the Recent heading when recent is an empty array. |
| loading | boolean | No | false | Data the assistant reads is still loading. The guided empty state keeps greeting and intro, shows kit Skeleton rows in place of the suggestions, and disables the composer (Send stays disabled). The section has aria-busy="true". With no placeholder set, the composer reads "Available when your data loads". |
| isThinking | boolean | No | false | Shows kit ThinkingAnimation in the thread. |
| thinkingSteps | array | No | — | While thinking: a live step list (done check, active Spinner, pending dashed circle, each with a status word for screen readers) in place of ThinkingAnimation. |
| onStop | function | No | — | While thinking: the composer reads "Working…" and Send becomes an outline Stop Button that calls this. |
| disabled | boolean | No | false | — |
| value | string | No | — | — |
| defaultValue | string | No | — | — |
| onValueChange | function | No | — | — |
| onSend | function | No | — | (message: string, details: ChatSendDetails) => void. details holds the upgraded composer's done attachments, tokens, mode (when modes show) and model; callers that take only the text keep working. |
| sendAppearance | solid | soft | No | solid | soft when another solid primary shares the view (e.g. a waiting ApprovalCard). |
| onClose | function | No | — | — |
| closeLabel | string | No | Close | — |
| menuItems | array | No | — | Optional overflow actions. kit DropdownMenu. |
| menuLabel | string | No | More | — |
| radius | lg | none | No | lg | lg is the standalone card. none squares the panel and drops the outer block/end borders so Chat can sit flush in a workspace rail. |
| embedded | boolean | No | false | Inside a host that already has a title, an edge and padding (a work panel tab, a Drawer): no header band, no outer border, no inline insets of its own, and it fills the host height (min 20rem). Suggestions line up with the thread text. title still names the section; status, onClose and menuItems are not shown. |
| attachments | array | No | — | Kit FileUpload items. Each is a kit Tag sm above the field: the name with its extension, "name · 40%" while uploading, a danger dot plus a ghost Retry IconButton ("Retry <name>") on error. Send stays disabled while any is uploading; done files go out in onSend details. |
| onAttach | function | No | — | (files: File[]) => void. Turns on the attach IconButton (picker), paste into the field and a quiet dashed drop zone over the composer. The app uploads and passes attachments back. |
| onAttachmentRemove | function | No | — | (id) => void. Makes chips removable; runs after the chip's exit. |
| onAttachmentRetry | function | No | — | (id) => void. The Retry beside an error chip. |
| accept | string | No | — | Passed to the file picker. |
| mode | ask | edit | plan | No | — | Controlled mode. mode, defaultMode, modes or onModeChange shows a kit SegmentedControl sm in the toolbar. The placeholder and Send's name follow it (Ask keeps placeholder and Send). |
| defaultMode | ask | edit | plan | No | — | — |
| onModeChange | function | No | — | (mode) => void |
| modes | array | No | — | Which of ask, edit, plan to offer, in order. Default all three. |
| models | array | No | — | kit ModelPicker models. Shows the picker sm, label hidden, in the toolbar: the current model name only. |
| model | string | No | — | — |
| onModelChange | function | No | — | (id) => void |
| dictation | boolean | No | false | A mic IconButton that dictates into the field through the browser's own speech recognition. Hidden where the browser has none (and on the server). While recording: a kit Meter sm with the live level (not under reduced motion) and an outline Stop. |
| commands | array | No | — | "/" opens a listbox of these (label without the slash). |
| mentions | array | No | — | "@" opens a listbox of these. A pick from either list becomes a kit Tag token at the start of the field: removable, Backspace at the field's start removes the last one whole, sent in onSend details. |
| className | string | No | — | — |
Dismissible overlay for short tasks, forms, or extra detail.
Must-choose overlay that interrupts until the user cancels or confirms.
A short note that floats in after an action, like Saved successfully, and goes away on its own after a few seconds, with an optional Undo.
Actions or value menu from a button, field, or nav trigger.