Message
A conversation row with avatar, alignment, header, footer, hover-reveal actions, and timestamps around your message surface. Compose with Bubble, Attachment, and MessageScroller.
Installation#
pnpm dlx shadcn@latest add @davinciui/messageUsage#
Message owns the row layout only — render the visible surface inside it with Bubble, and wrap the thread in MessageScroller. align="end" mirrors the whole row and docks bubbles, header, footer, and actions to the right — no align needed on Bubble. The avatar is measured against the footer and lifted to stay aligned with the surface, at any footer height.
Message
├── MessageAvatar
└── MessageContent
├── MessageHeader
├── Bubble
├── MessageFooter
└── MessageActions
MessageGroup
├── Message
└── MessageComposition#
Use the following composition to build a Message:
MessageGroup
└── Message
├── MessageAvatar
├── MessageContent
│ ├── MessageHeader
│ └── MessageFooter
├── MessageActions
└── MessageTimeAPI Reference#
| Prop | Type | Default |
|---|---|---|
alignRow alignment. End mirrors the row and docks bubbles, header, footer, and actions right. | "start" | "end" | "start" |
MessageActionsHover-reveal action row. Visible on hover, keyboard focus, and touch. | div element | — |
MessageTimeMono tabular timestamp for headers and footers. | time element | — |
aria-labelRequired on icon-only footer actions and textless triggers. | string | — |
roleAnnounce in-progress rows as live status updates. | "status" | — |
classNameAdditional classes on any part. | string | — |
Accessibility#
Message is a layout-only div with no ARIA roles; consumers add role status for streaming rows. Actions start at opacity 0 but stay in the tab order and reveal via group-focus-within on keyboard focus. Icon-only actions need aria-label.
Motion#
MessageActions fade in over 150ms ease-out on hover or focus and remain visible on touch devices. motion-reduce disables that transition, and the rest of the row is static; there are no animation timing props.
View source
Keep in mind
Need a custom component?
I build bespoke UI components & websites tailored to your brand.

