Components
- Accordion
- Alert
- Alert Dialog
- Aspect Ratio
- Attachment
- Autocomplete
- Avatar
- Badge
- Breadcrumb
- Bubble
- Button
- Calendar
- Card
- Carousel
- Chart
- Checkbox
- Checkbox Group
- Collapsible
- Combobox
- Command
- Context Menu
- Date Picker
- Dialog
- Drawer
- Dropdown Menu
- Empty
- Field
- Fieldset
- Form
- Frame
- Group
- Input
- Input Group
- Kbd
- Label
- Menu
- Menubar
- Message
- Meter
- Number Field
- OTP Field
- Pagination
- Popover
- Preview Card
- Progress
- Questionnaire
- Radio Group
- Scroll Area
- Select
- Separator
- Sheet
- Sidebar
- Skeleton
- Slider
- Spinner
- Switch
- Table
- Tabs
- Textarea
- Toggle
- Toggle Group
- Toolbar
- Tooltip
Shared
- Artifact
- Audio Player
- Canvas
- Chain of Thought
- Checkpoint
- Code Block
- Commit
- Connection
- Context
- Controls
- Edge
- Environment Variables
- Mic Selector
- Model Selector
- Node
- Node Toolbar
- Open in Chat
- Panel
- Plan
- Prompt Input
- Queue
- Reasoning
- Sandbox
- Schema Display
- Shimmer
- Snippet
- Sources
- Speech Input
- Stack Trace
- Suggestion
- Tool
- Transcription
- Web Preview
Hooks
Resources
Bubble
A chat bubble for a single turn in a conversation.
Can you summarise the release notes?
The release adds keyboard navigation to the combobox and fixes focus restoration in dialogs.
import { Bubble, BubbleContent, BubbleGroup } from "@/components/ui/bubble";
export default function Particle() {
return (
<BubbleGroup className="w-full">
<Bubble align="end">
<BubbleContent>Can you summarise the release notes?</BubbleContent>
</Bubble>
<Bubble variant="muted">
<BubbleContent>
The release adds keyboard navigation to the combobox and fixes focus restoration in
dialogs.
</BubbleContent>
</Bubble>
</BubbleGroup>
);
}
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.
| Prop | Type | Default |
|---|---|---|
variant | "default" | "secondary" | "muted" | "tinted" | "outline" | "ghost" | "destructive" | "default" |
align | "start" | "end" | "start" |
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
default
secondary
muted
tinted
outline
ghost
destructive
import { Bubble, BubbleContent, BubbleGroup } from "@/components/ui/bubble";
const variants = [
"default",
"secondary",
"muted",
"tinted",
"outline",
"ghost",
"destructive",
] as const;
export default function Particle() {
return (
<BubbleGroup className="w-full">
{variants.map((variant) => (
<Bubble key={variant} variant={variant}>
<BubbleContent>{variant}</BubbleContent>
</Bubble>
))}
</BubbleGroup>
);
}
With Reactions
That fixed it — thank you.
🎉2
import { Bubble, BubbleContent, BubbleGroup, BubbleReactions } from "@/components/ui/bubble";
export default function Particle() {
return (
<BubbleGroup className="w-full">
<Bubble className="mb-3" variant="muted">
<BubbleContent>That fixed it — thank you.</BubbleContent>
<BubbleReactions>
<span>🎉</span>
<span>2</span>
</BubbleReactions>
</Bubble>
</BubbleGroup>
);
}