Skip to content

shadcn.io is not affiliated with official shadcn/ui

Shadcn Message for React

Conversation message row with optional avatar, header, footer, and alignment.

@me
ME
Deploying to prod real quick.
@rabbit
R
It's 4:55 PM. On a Friday.
@me
ME
It's a one-line change.
@rabbit
R
It's always a one-line change 😭.
Alright, let me take a look.
šŸ‘
Oliver is typing...

Installation

bunx --bun shadcn@latest add https://kit.dev/r/aria/message.json

Anatomy

Message
ā”œā”€ā”€ MessageAvatar
└── MessageContent
    ā”œā”€ā”€ MessageHeader
    ā”œā”€ā”€ Bubble
    └── MessageFooter
MessageGroup
ā”œā”€ā”€ Message
└── Message

Usage

import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
import { Bubble, BubbleContent } from "@/components/ui/bubble";
import { Message, MessageAvatar, MessageContent } from "@/components/ui/message";
<Message className="max-w-full min-w-0">
  <MessageAvatar>
    <Avatar>
      <AvatarImage src="https://github.com/shadcn.png" alt="@shadcn" />
      <AvatarFallback>CN</AvatarFallback>
    </Avatar>
  </MessageAvatar>
  <MessageContent className="min-w-0">
    <Bubble>
      <BubbleContent>How can I help you today?</BubbleContent>
    </Bubble>
  </MessageContent>
</Message>

Demos

Avatar

Group

Actions

Attachment

Markdown

API Reference