Skip to Content
Liquid Glass UI
Components

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 Body 17/22 with 18px radius on mobile ↔ macOS 27 13/18 with 14px radius on desktop; consecutive bubbles stack tightly via BubbleGroup (4px ↔ 2px).
  • Semantic colors: default for sent messages (follows the theme accent, defaulting to iMessage Blue), secondary for received messages (#E9E9EB light / #262629 dark), and remaining shadcn variants mapped to Apple system fills.
  • Tapback reactions: BubbleReactions renders 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) when glass is 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.
apple-liquid-ui/preview/bubble-demo
MacBook · 16:10

Installation (Shadcn Registry)

npx shadcn@latest add @apple-liquid/bubble

All Variants

apple-liquid-ui/preview/bubble-variants
MacBook · 16:10

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:

apple-liquid-ui/preview/bubble-glass
MacBook · 16:10

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

PropertyMobile (< 768px, iOS 27)Desktop (>= 768px, macOS 27)
Font size / line height17px / 22px13px / 18px
Border radius18px14px
Padding12px × 7px10px × 5px
Consecutive bubble gap4px2px
Max width80%72%

Props API

Bubble

PropTypeDefaultDescription
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"
glassbooleantrueRenders 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-detectedManually override surface context; automatically 'over-glass' inside glass containers

BubbleReactions

PropTypeDefaultDescription
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

On this page