Message
A single turn from the user or the assistant, with hover-revealed actions.
Installation
pnpm dlx shadcn@latest add @jds/message
Usage
import { Message, MessageContent } from "@/components/ai/message"
<Message from="user">
<MessageContent>Summarize this thread.</MessageContent>
</Message>API Reference
Message
| Prop | Type | Default |
|---|---|---|
fromSets alignment and bubble style. | "user" | "assistant" | "system" | – |
MessageStyleProvider
| Prop | Type | Default |
|---|---|---|
bubblesWho gets a bubble. For messages outside a Conversation. | "user" | "all" | "none" | "user" |
shapeBubble corners: a tail toward the speaker, fully round, or squarer. | "tail" | "round" | "square" | "tail" |
densitySpacing between and inside messages. Compact suits side panels. | "comfortable" | "compact" | "comfortable" |
MessageAction
| Prop | Type | Default |
|---|---|---|
labelAccessible name and tooltip text. | string | – |