Forms
Navigation & layout
Data display & feedback
Date & time
Browse components
← All components
Message
Message row with avatar, alignment, header, and footer.
Install
npx shadcn@latest add https://ui.anuragroy.dev/r/message.jsonPreview
Loading preview…
Installation
Add the component from this site. The shadcn CLI fetches the registry JSON over HTTPS — no named registry submission required.
Terminal
npx shadcn@latest add https://ui.anuragroy.dev/r/message.jsonGitHub fallback if the website is down:
Terminal
npx shadcn@latest add https://raw.githubusercontent.com/anurag-roy/ui.anuragroy.dev/main/public/r/message.jsonUsage
Import paths follow your components.json aliases. After install, the default path is @/components/ui/message.
Import
import { Message, MessageAvatar, MessageContent, MessageFooter, MessageHeader} from "@/components/ui/message"example.tsx
import { Bubble, BubbleContent } from "@/components/ui/bubble"import { Message, MessageContent, MessageFooter, MessageHeader,} from "@/components/ui/message"export function Example() { return ( <Message> <MessageContent> <MessageHeader>Assistant</MessageHeader> <Bubble variant="secondary"> <BubbleContent>I can group rows and leave room for actions.</BubbleContent> </Bubble> <MessageFooter>Just now</MessageFooter> </MessageContent> </Message> )}API Reference
Message
| Prop | Type | Default |
|---|---|---|
| align | "start" | "end" | "start" |
- align — Use `end` for user turns.
Notes
- `MessageGroup` is also exported for stacked turns.