---
title: "Message"
description: "A chat message layout with avatar, header, content, and footer, grouped by sender. Pairs with Bubble and Message Scroller."
plan: Free
docs: https://ui.edbn.me/docs/components/message
---

# Message

A chat message layout with avatar, header, content, and footer, grouped by sender. Pairs with Bubble and Message Scroller.

## Installation

```bash
npx shadcn@4.19.0 add https://ui.edbn.me/r/message.json
```

## Dependencies
- edbn: edbn-base

## Usage

```tsx examples/message-basic.tsx
"use client";
import { Copy } from "lucide-react";
import { Avatar, AvatarFallback } from "@/components/ui/avatar";
import { Bubble, BubbleContent } from "@/components/ui/bubble";
import { Button } from "@/components/ui/button";
import {
  Message,
  MessageActions,
  MessageAvatar,
  MessageContent,
  MessageFooter,
  MessageHeader,
} from "@/components/ui/message";

export default function MessageBasicPreview() {
  return (
    <Message className="max-w-wide">
      <MessageAvatar>
        <Avatar>
          <AvatarFallback>AI</AvatarFallback>
        </Avatar>
      </MessageAvatar>
      <MessageContent>
        <MessageHeader>Assistant</MessageHeader>
        <Bubble variant="muted">
          <BubbleContent>
            Your component migration is ready to review.
          </BubbleContent>
        </Bubble>
        <MessageFooter className="gap-2">
          Just now
          <MessageActions>
            <Button variant="ghost" size="icon-xs" aria-label="Copy">
              <Copy />
            </Button>
          </MessageActions>
        </MessageFooter>
      </MessageContent>
    </Message>
  );
}
```

## Files
- components/ui/message.tsx (109 lines)

## For agents
- Base theme, once per project: npx shadcn@4.19.0 add https://ui.edbn.me/r/edbn-base.json
- MCP server with search, items, examples and source: https://ui.edbn.me/mcp
- Every page and item: https://ui.edbn.me/llms.txt
