Message
A conversation row for avatars, message surfaces, sender context, and metadata.
Message lays out one conversational entry. It owns the row, avatar, sender context, and footer while leaving the visible message surface to Bubble.
Import
Section titled “Import”import { Avatar, Bubble, Message } from "@zentara-co/zenos-ui";Composition
Section titled “Composition”Compose an optional avatar beside Message.Content. Place Message.Header, a Bubble, and Message.Footer inside the content column.
<Message> <Message.Avatar> <Avatar name="Rina" size="sm" /> </Message.Avatar> <Message.Content> <Message.Header>Rina</Message.Header> <Bubble variant="secondary"> <Bubble.Content>The report is ready.</Bubble.Content> </Bubble> <Message.Footer>Read</Message.Footer> </Message.Content></Message>Message is a presentational row rather than a transcript or scroll container. Put conversation-level semantics such as role="log" and an accessible label on the surrounding region.
Alignment and RTL
Section titled “Alignment and RTL”Set align="start" or align="end" on Message to move the avatar to the matching logical side. Give the composed Bubble the same alignment when its surface should follow the row. Logical layout automatically mirrors in an RTL document or DirectionProvider.
<Message align="end"> <Message.Avatar> <Avatar name="You" size="sm" /> </Message.Avatar> <Message.Content> <Bubble align="end"> <Bubble.Content>Deploying now.</Bubble.Content> </Bubble> <Message.Footer>Delivered</Message.Footer> </Message.Content></Message>Consecutive messages
Section titled “Consecutive messages”Use Message.Group for consecutive entries. An empty avatar slot on earlier messages preserves alignment when the final message displays the sender avatar.
Header and footer
Section titled “Header and footer”Use Message.Header for sender context. Use Message.Footer for timestamps, delivery status, or message-level actions. End-aligned rows place footer content on the logical end automatically.
Message.Root Message.Group Message.Avatar Message.Content Message.Header Message.Footer
API
| Prop | Type | Default | Description |
|---|---|---|---|
align | start | end | start | Logical alignment of the message row and avatar. |
Group | HTMLAttributes<HTMLDivElement> | — | Stacks consecutive messages from the same conversation. |
Avatar | HTMLAttributes<HTMLDivElement> | — | Bottom-aligned slot for an Avatar or another sender marker. |
Content | HTMLAttributes<HTMLDivElement> | — | Wraps the header, message surface, and footer. |
Header / Footer | HTMLAttributes<HTMLDivElement> | — | Sender context and message-level metadata or actions. |
native props | React.HTMLAttributes<HTMLDivElement> | — | Forwards native attributes, events, aria-*, data-*, className, style, and ref. |
Unless narrowed above, each DOM-rendering part also accepts its underlying native or Base UI props,
including className, style, aria-*, and data-*.
Accessibility
Section titled “Accessibility”Message does not add chat semantics by itself. Keep sender names and status text meaningful, label icon-only footer actions, and use a live region only for updates that should be announced. Do not rely on alignment or color alone to identify the sender.