<div className="flex w-full max-w-sm flex-col gap-4">
<Message>
<MessageAvatar>
<Avatar size="sm">
<AvatarFallback>LN</AvatarFallback>
</Avatar>
</MessageAvatar>
<MessageContent>
<MessageHeader>Lena · 2:14 PM</MessageHeader>
<BubbleGroup>
<Bubble variant="muted">
<BubbleContent>Did you see the new studio panel?</BubbleContent>
</Bubble>
<Bubble variant="muted">
<BubbleContent>The drill-in feels really smooth.</BubbleContent>
</Bubble>
</BubbleGroup>
</MessageContent>
</Message>
<Message align="end">
<MessageContent>
<Bubble align="end">
<BubbleContent>Shipping it this week 🚀</BubbleContent>
</Bubble>
<MessageFooter>Seen · 2:16 PM</MessageFooter>
</MessageContent>
</Message>
</div>Installation
npx shadcn@latest add @dotui/messageUsage
import { Message, MessageContent } from "@/ui/message"<Message align="end">
<MessageContent>{/* bubbles, text, rich content */}</MessageContent>
</Message>Anatomy
Message lays out one turn: align picks the side of the thread and flips
the row, so the MessageAvatar sits on the sender's side. MessageContent
is the content column — put a Bubble inside for
contained messages, or plain content for full-width assistant replies.
MessageHeader and MessageFooter carry metadata like the sender name,
timestamp, or delivery status, and consecutive messages from one sender stack
in a MessageGroup.
import {
Message,
MessageAvatar,
MessageContent,
MessageFooter,
MessageHeader,
} from "@/ui/message"<Message>
<MessageAvatar>{/* <Avatar /> */}</MessageAvatar>
<MessageContent>
<MessageHeader>Lena · 2:14 PM</MessageHeader>
{/* content */}
<MessageFooter>Seen</MessageFooter>
</MessageContent>
</Message>Examples
Basic
Group
API Reference
MessageGroup
Message
One turn in a conversation — lays out the avatar and the content column on one side of the thread.
Supports all div attributes.
| Prop | Type | Default | |
|---|---|---|---|
MessageAvatar
The sender's avatar — a circular wrapper for an image, initials, or icon. Anchors to the bottom of the message.
Supports all div attributes.
| Prop | Type | Default | |
|---|---|---|---|
MessageContent
The message's content column — bubbles, text, or any rich content.
Supports all div attributes.
| Prop | Type | Default | |
|---|---|---|---|
MessageHeader
MessageFooter
Metadata below the content — delivery status, reactions summary.
Supports all div attributes.
| Prop | Type | Default | |
|---|---|---|---|
Last updated on 8/31/2026