Skip to Content
Liquid Glass UI
Components

Popover

Responsive Apple Liquid Glass popover displaying a 20px-radius floating macOS 27 Liquid Glass panel on desktop, and automatically switching to a swipe-to-dismiss iOS 27 bottom Liquid Glass Sheet on mobile.

Fully compatible with the standard shadcn/ui JSX API (<Popover> / <PopoverTrigger> / <PopoverContent> / <PopoverHeader> / <PopoverTitle> / <PopoverDescription> / <PopoverClose>), following Apple 27 HIG via useIsMobile() (768px):

  • Desktop (>= 768px · macOS 27): Powered by @base-ui/react/popover, anchored around the trigger with a 20px radius and <LiquidSurfaceBackdrop tone="menu" /> edge refraction so nested Switch and Slider LiquidLens controls refract cleanly without Backdrop Root conflicts.
  • Mobile (< 768px · iOS 27): Matches Apple's "Popovers adapt to Sheets in compact width" guideline, automatically switching to a 32px top-radius bottom Liquid Glass Drawer with swipe-to-dismiss and safe-area padding.

Responsive Live Preview

Combines Slider and Switch directly inside a Liquid Glass popover; toggle Desktop / Tablet / Mobile top-right and adjust the left Glass Tint slider to inspect optical refraction:

apple-liquid-ui/preview/popover-liquid-hero
MacBook · 16:10

Installation (Shadcn Registry)

# Install via the configured @apple-liquid namespace (includes drawer, liquid-surface, use-mobile, and liquid-glass)
npx shadcn@latest add @apple-liquid/popover

Multi-Side Placement

Supports side="top" | "bottom" | "left" | "right" and align="start" | "center" | "end" with automatic viewport collision avoidance on desktop and bottom Drawer adaptation on mobile:

apple-liquid-ui/preview/popover-alignment
MacBook · 16:10

Compact Settings Form

Ideal for toolbar or inspector controls, paired with PopoverClose to dismiss after applying changes:

apple-liquid-ui/preview/popover-quick-form
MacBook · 16:10

Usage

import { Button } from '@/components/ui/button';
import {
  Popover,
  PopoverClose,
  PopoverContent,
  PopoverDescription,
  PopoverHeader,
  PopoverTitle,
  PopoverTrigger,
} from '@/components/ui/popover';

export function Example() {
  return (
    <Popover>
      <PopoverTrigger render={<Button variant="secondary">Open Settings</Button>} />
      <PopoverContent>
        <PopoverHeader>
          <PopoverTitle>Quick Settings</PopoverTitle>
          <PopoverDescription>Adjust display options for the current view.</PopoverDescription>
        </PopoverHeader>
        <div className="flex justify-end gap-2">
          <PopoverClose render={<Button size="sm" variant="default" />}>
            Done
          </PopoverClose>
        </div>
      </PopoverContent>
    </Popover>
  );
}

Props API

PopoverContent

PropTypeDefaultDescription
glassbooleantrueLiquid Glass material reacting to glass tint; false renders a 100% opaque surface
side'top' | 'bottom' | 'left' | 'right''bottom'Desktop popup side relative to trigger
sideOffsetnumber8Desktop distance in px from trigger
align'start' | 'center' | 'end''center'Desktop alignment along anchor axis
alignOffsetnumber0Desktop alignment offset in px
mobileTitleReact.ReactNode—Optional centered mobile Drawer title when <PopoverTitle> is not present
classNamestring—Customize panel width or spacing (defaults to w-80 on desktop, full width on mobile)

On this page