Agents
Message
One turn in an agent conversation: user turns sit right in a bubble, agent turns sit left beside the agent's mark with sources and quiet actions, system turns are a centred line.
Group: Agents. Exports: Message. Halaska addition with no shadcn/ui equivalent.
Usage
import { Message } from "./halaska-kit";
Message props
role"user" | "agent" | "system"(default "agent"): Who is speaking; sets alignment, bubble and default avatar (default: "agent")textstring(default MSG_DEMO_TEXT): The message as plain text (default: MSG_DEMO_TEXT); `children` replaces it with any contentchildrennode: Rich content for the turn; wins over `text`namestring: Speaker name; shown above an agent turn, used for the user's default avatartimestring: Timestamp label shown with the turn, for example "2:47 PM"avatarnode: Replaces the default avatar; `null` hides it. Default is AgentGlyph for the agent and Avatar with the name for the userstatus"sending" | "sent" | "failed": Delivery state of a user turn; failed keeps the actions visible so Retry is reachableactions{ label: string, icon?: node | "copy" | "retry" | "up" | "down" | "check" | "edit", onClick: () => void, active?: boolean }[](default []): Quiet actions shown on hover and focusstreamingboolean(default false): Shows a caret at the end of the text while it arrives (default: false)sources{ name: string, href?: string }[](default []): Source chips under an agent turncompactboolean(default false): Tighter spacing, smaller avatar and type (default: false)
Accessibility
- Actions are labelled buttons that appear on hover and on keyboard focus, and stay visible on a failed turn so Retry is reachable.
- A streaming turn is marked aria-busy and its caret is decorative.
- Sending and Not sent states are exposed with the status role; the default avatars are named images.
- Sources render as a named list; a source with an href is a real link that opens in a new tab.
Known gaps
- No Markdown rendering: pass rich content as children.
- No edit-in-place for user turns.
Used in
Halaska UI · Components · Patterns · Screens · Install