Message
One turn in a conversation, with avatar, header, bubbles and footer. For chat and AI interfaces.
Usage
import {
Message,
MessageAvatar,
MessageContent,
MessageFooter,
MessageGroup,
MessageHeader,
} from "@zynactra/ui/message"
import { Bubble, BubbleContent } from "@zynactra/ui/bubble"<MessageGroup>
<Message>
<MessageContent>
<Bubble variant="muted">
<BubbleContent>The staging build is green.</BubbleContent>
</Bubble>
</MessageContent>
</Message>
<Message align="end">
<MessageContent>
<Bubble>
<BubbleContent>Ship it.</BubbleContent>
</Bubble>
<MessageFooter>Read</MessageFooter>
</MessageContent>
</Message>
</MessageGroup>align="end" puts the current user's messages on the right. Message is layout only; the text goes in a Bubble, and files in an Attachment.
Guidelines
- The current user is
endwith thedefaultbubble; everyone else isstartwithmuted. For an AI assistant,ghostbubbles read as a document rather than a chat partner. - Group consecutive messages from one sender in a
BubbleGroupwith one avatar and one header. - Timestamps go in the header, delivery state in the footer.