Chat Message
@astryxdesign/core v0.7.1 · ChatMessage
Props
| Prop | Type | Default | Description |
|---|---|---|---|
sender | 'user' | 'assistant' | 'system' | — | Who sent this message: controls alignment and layout. Required. A system row is centered and ignores the avatar, name, and metadata slots. |
name | string | — | Plain sender name rendered above the body. Use it when the first child is raw content, not a bubble; with bubbles, set the name on the first bubble instead so it lines up with the bubble padding. |
density | ChatDensity | list value, then 'balanced' | Visual density: 'compact', 'balanced', or 'spacious'. Inherited from the surrounding ChatMessageList when not set. |
Slots
default: message content: bubbles, tool calls, reasoning, or raw nodes. Custom content renders flush with the message edge; wrap it in a ghostChatMessageBubbleto align it with the bubble text column.avatar: element rendered beside the message, typicallyAvatar. Ignored whensenderissystem.name: replaces thenameprop.metadata: rendered below the body. Use it when the last child is raw content, not a bubble; with bubbles, use the bubble'smetadataslot instead.
Exposed
element: the root<article>element.