All components

Bubble

Framed conversational surfaces using the same solid, subtle, surface, outline, ghost, and plain variants as Button and Badge, plus start/end alignment, grouping, and edge-anchored reactions.

Hey there! what's up?
Hey! Want to see chat bubbles?
I can group messages, switch sides, and keep the whole thread easy to scan.
Sure. Hit me with your best demo.

Variants

This is the solid bubble.
solid
This is the subtle bubble.
subtle
This is the surface bubble.
surface
This is the outline bubble.
outline
Ghost bubbles are unframed and can span the full row.
ghost
Plain bubbles are unframed and can span the full row.
plain

Alignment

Use align on Bubble.Root to pin the surface to the start or end of the conversation. In a full chat row, prefer Message alignment instead.

This bubble is aligned to the start. This is the default.
This bubble is aligned to the end. Use this for user messages.

Bubble Group

Bubble.Group stacks consecutive bubbles from the same sender. Set align on each Bubble.Root, not on the group.

Can you tell me what's the issue?
You tell me!
It worked yesterday. You broke it!
Find the bug and fix it.
Want me to diff yesterday's you against today's you? It's a bit embarrassing.

Links and Buttons

Turn Bubble.Content into a real button or link with asChild so the bubble is focusable and exposes the correct role.

How can I help you today?

Reactions

Bubble.Reactions anchors a row to the bubble edge. Use side and align to place it — side="top" sits on the upper edge. Reactions overlap, so leave extra vertical space between rows.

I don't need tests, I know my code works.
Bold. Fine I'll add some tests. I'll let you know when they're done.
Tests passed on the first try. All 142 of them. Looking good!

Show More / Collapsible

Compose long bubble copy with Collapsible so readers can expand the rest of the message without leaving the thread.

How can I help you today?
The accessibility review found two focus states that were visually too subtle in dark mode.

Ghost and Plain

Ghost and plain drop the frame and the 80% max-width so assistant text and rich content can span the full row — the same unframed treatments as Button and Badge.

Ghost bubbles work for assistant text and other content that should not be framed. They take the full width of the container.
Plain is the same unframed span without a hover fill — useful when the bubble is not interactive.

Tooltip

Wrap a bubble in Tooltip to reveal metadata on hover or focus, such as when a message was read.

Did you remove the stale route?
Yes, removed it from the registry.

Popover

Pair a bubble with Popover to surface more information on demand, such as the full error for a failed action.

Run the build script.

Install

Source

components/ui/ark-ui/bubble.tsx

Inspired by the Bubble component from shadcn/ui.