Components
Message
A chat-style message row with avatar and content slots.
Message is a chat-style message row. It pairs an avatar with a header, content, and footer, and supports left or right alignment. Put Bubble inside MessageContent for the message body.
Installation
pnpm dlx shadcn@latest add https://faber-ui.vercel.app/r/message.jsonUsage
import { Avatar, AvatarFallback } from "@/components/ui/avatar";
import { Bubble, BubbleContent } from "@/components/ui/bubble";
import {
Message,
MessageAvatar,
MessageContent,
MessageGroup,
MessageHeader,
} from "@/components/ui/message";
export default function Example() {
return (
<MessageGroup>
<Message>
<MessageAvatar>
<Avatar>
<AvatarFallback>AB</AvatarFallback>
</Avatar>
</MessageAvatar>
<MessageContent>
<MessageHeader>Anna</MessageHeader>
<Bubble variant="muted">
<BubbleContent>Hello there!</BubbleContent>
</Bubble>
</MessageContent>
</Message>
</MessageGroup>
);
}Examples
Default
Consecutive bubbles
Stack several bubbles in one MessageContent when the same person sends messages back to back. The avatar sits beside the last one.
With footer
Use MessageFooter for timestamps and delivery status. The avatar stays aligned with the last bubble, not the footer.
API
Each part forwards every prop of what it is built on, including className and render where Base UI supports it. The props column lists only what Faber UI adds on top.
| Part | Built on | Props |
|---|---|---|
MessageGroupdata-slot="message-group" | <div>HTML | — |
Messagedata-slot="message" | <div>HTML |
|
MessageAvatardata-slot="message-avatar" | <div>HTML | — |
MessageContentdata-slot="message-content" | <div>HTML | — |
MessageHeaderdata-slot="message-header" | <div>HTML | — |
MessageFooterdata-slot="message-footer" | <div>HTML | — |
Changelog
Full Message historyLast updated on