Skip to content

Bubble

A chat bubble for a single turn in a conversation.

Installation

pnpm dlx shadcn@latest add @frontal-labs/bubble

Usage

import { Bubble, BubbleContent, BubbleGroup } from "@/components/ui/bubble";
<BubbleGroup>
  <Bubble align="end">
    <BubbleContent>Can you summarise the release notes?</BubbleContent>
  </Bubble>
  <Bubble variant="muted">
    <BubbleContent>Sure — here is what changed.</BubbleContent>
  </Bubble>
</BubbleGroup>

API Reference

BubbleGroup

Stacks bubbles vertically with consistent spacing.

Bubble

Root of a single bubble.

Use align="end" for the current user's own turns.

BubbleContent

The bubble body. Supports Base UI's render prop, so it can become a button or link when the whole bubble should be interactive.

BubbleReactions

Absolutely positioned reaction chip. Accepts side ("top" | "bottom") and align ("start" | "end").

Examples

Variants

With Reactions