Bubble
Apple Messages-style chat bubbles with solid accent fill for sent messages, system gray for received messages, optional Liquid Glass bubbles, and Tapback reaction badges.
Fully compatible with the standard shadcn/ui JSX API (BubbleGroup / Bubble / BubbleContent / BubbleReactions, with polymorphic render on BubbleContent for buttons or links), crafted after Apple iOS 27 / macOS 27 Messages:
- Responsive typography: iOS 27
Body17/22 with 18px radius on mobile ↔ macOS 27 13/18 with 14px radius on desktop; consecutive bubbles stack tightly viaBubbleGroup(4px ↔ 2px). - Semantic colors:
defaultfor sent messages (follows the theme accent, defaulting to iMessage Blue),secondaryfor received messages (#E9E9EBlight /#262629dark), and remaining shadcn variants mapped to Apple system fills. - Tapback reactions:
BubbleReactionsrenders an elevated solid reaction pill anchored to a bubble corner, with automatic vertical clearance. - Optional Liquid Glass: Matches Messages with solid bubbles by default or translucent Liquid Glass on neutral bubbles (
secondary/muted/outline) whenglassis enabled over wallpapers or photos; sent bubbles stay solid accent for legibility. - Automatic Over-Glass switching: Inside glass surfaces (glass Card, Dialog, Sheet, etc.), neutral bubbles automatically switch to Over-Glass flat fills to prevent glass-on-glass stacking.
Installation (Shadcn Registry)
npx shadcn@latest add @apple-liquid/bubbleAll Variants
Liquid Glass Bubbles
Switch the preview backdrop and drag the Glass Tint slider in the left sidebar to observe the continuous shift from clear to tinted glass:
Usage
import {
Bubble,
BubbleContent,
BubbleGroup,
BubbleReactions,
} from '@/components/ui/bubble';
export function Example() {
return (
<BubbleGroup>
<Bubble variant="secondary">
<BubbleContent>Want to visit the exhibition this weekend?</BubbleContent>
</Bubble>
<Bubble variant="default" align="end">
<BubbleContent>Count me in!</BubbleContent>
<BubbleReactions side="bottom" align="start">❤️</BubbleReactions>
</Bubble>
</BubbleGroup>
);
}Platform Differences
| Property | Mobile (< 768px, iOS 27) | Desktop (>= 768px, macOS 27) |
|---|---|---|
| Font size / line height | 17px / 22px | 13px / 18px |
| Border radius | 18px | 14px |
| Padding | 12px × 7px | 10px × 5px |
| Consecutive bubble gap | 4px | 2px |
| Max width | 80% | 72% |
Props API
Bubble
| Prop | Type | Default | Description |
|---|---|---|---|
variant | 'default' | 'secondary' | 'muted' | 'tinted' | 'outline' | 'ghost' | 'destructive' | 'default' | Bubble semantic style; default for sent, secondary for received |
align | 'start' | 'end' | 'start' | Horizontal alignment; automatically right-aligned inside Message align="end" |
glass | boolean | true | Renders neutral bubbles (secondary / muted / outline) in Liquid Glass; false renders 100% opaque Apple Messages bubbles. default / tinted / destructive retain their color fills |
surface | 'default' | 'over-glass' | Auto-detected | Manually override surface context; automatically 'over-glass' inside glass containers |
BubbleReactions
| Prop | Type | Default | Description |
|---|---|---|---|
side | 'top' | 'bottom' | 'bottom' | Whether the reaction badge attaches to the top or bottom edge |
align | 'start' | 'end' | 'end' | Whether the reaction badge aligns to the leading or trailing side |
Breadcrumb
Finder path-bar-inspired breadcrumb navigation with rounded hover highlights, hairline chevron separators, and 15px mobile ↔ 13px desktop typography.
Button
Responsive Liquid Glass button built to Apple macOS 27 and iOS 27 guidelines, powered by @liqui-design/glass real optical refraction, Base UI, and Motion spring physics.