Message
A chat-style message bubble with sent/received variants and iOS-tapback-style reactions overlapping the bubble corner, a MessageReactions max/+N overflow stack like AvatarGroup, plus a source-citation use case for LLM responses.
Installation
npx dafink-ui add messageDemos
Media messages
Message renders whatever you pass as children. A compact AudioPlayer drops straight into the default bubble; its controls pick up the bubble's own text color automatically, no extra props needed. For content with its own visual chrome, like an image, pass bubble={false} so it isn't nested inside a second colored box.
Just got back from the trip. Here's the view!
Composition
<Message>
</Message>
Props
| Name | Type | Default | Description |
|---|---|---|---|
| variant | 'sent' | 'received' | 'received' | 'sent' right-aligns the bubble in brand fill; 'received' left-aligns it in a neutral surface tint. |
| avatar | ReactNode | - | Optional avatar rendered beside the bubble. |
| bubble | boolean | true | Set false to render children without the bubble background/padding, for content that supplies its own chrome (an image, an AudioPlayer) so it isn't nested in a second colored box. |
| className | string | '' | Additional CSS classes merged onto the root row. |
| children | ReactNode | - | The message content. A MessageReactions child is detected and extracted automatically; it can appear anywhere inside. |