Bubble
Chat message bubbles for conversational interfaces, with incoming and outgoing styles for AI chat and messaging UIs.
Installation
Bash
Usage
Bubble is scoped to the visible message surface. Pair it with
Message for row layout (avatar, header,
footer) and BubbleGroup for consecutive bubbles from one sender. Make
a bubble interactive by rendering its content as a real element:
<BubbleContent render={<button />}>.
Examples
Variants
The ghost variant drops the background, padding, and max-width — meant
for assistant/AI content that should span the full column.
Reactions
BubbleReactions overlaps the bubble edge; position it with side and
align.
API reference
Bubble
Extends div.
| Prop | Type | Default |
|---|---|---|
variant | "default" | "secondary" | "muted" | "tinted" | "outline" | "ghost" | "destructive" | "default" |
align | "start" | "end" | "start" |
BubbleContent
The message surface. Supports the Base UI render prop to become a
button or a for interactive bubbles (hover and focus styles are
built in).
| Prop | Type | Default |
|---|---|---|
render | React.ReactElement | div |
BubbleReactions
Extends div. Absolutely positioned over the bubble’s edge.
| Prop | Type | Default |
|---|---|---|
side | "top" | "bottom" | "bottom" |
align | "start" | "end" | "end" |
BubbleGroup
Extends div. Stacks consecutive bubbles with tight spacing.