npx shadcn add https://hq-ui.vercel.app/r/message
align propalign="end" rowsclassName prop on every partUse MessageAvatar to render an avatar next to the message. Set align="end" on the message to align the avatar to the end of the message.
| align | Description |
|---|---|
start | Align the message to the start of the conversation. |
end | Align the message to the end of the conversation. |
Use MessageGroup to stack consecutive messages from the same sender. Render an empty MessageAvatar on the earlier messages to keep them aligned with the avatar on the last one.
Use MessageHeader for a sender name and MessageFooter for metadata such as a delivery or read status.
Place message-level actions in MessageFooter, such as copy, retry, or feedback buttons.
Message is a presentational layout wrapper. Accessibility comes from the content you place inside it.
Action buttons in MessageFooter are usually icon-only, so give each one an aria-label.
<MessageFooter>
<Button variant="ghost" size="icon" aria-label="Copy">
<CopyIcon />
</Button>
</MessageFooter>For in-progress messages, use a Marker with role="status" so assistive tech announces the update as it appears.
<Message>
<Marker role="status">
<MarkerIcon>
<Spinner />
</MarkerIcon>
<MarkerContent>Checking the logs...</MarkerContent>
</Marker>
</Message>The message row wrapper.
| Prop | Type | Default | Description |
|---|---|---|---|
align | "start" | "end" | "start" | The alignment of the message in the conversation. |
className | string | - | Additional classes to apply to the row. |
Groups consecutive messages from the same sender.
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | - | Additional classes to apply to the group root. |
The avatar slot, aligned to the bottom of the message. When the message has a MessageFooter, the avatar shifts up to stay aligned with the message surface instead of the footer.
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | - | Additional classes to apply to the avatar slot. |
Wraps the header, message surface, and footer.
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | - | Additional classes to apply to the content slot. |
Displays content above the message, such as a sender name. Stays aligned to the start regardless of align.
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | - | Additional classes to apply to the header. |
Displays content below the message, such as status or actions. Aligns to the message side.
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | - | Additional classes to apply to the footer. |