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 a20pxradius and<LiquidSurfaceBackdrop tone="menu" />edge refraction so nestedSwitchandSliderLiquidLenscontrols refract cleanly without Backdrop Root conflicts. - Mobile (
< 768px· iOS 27): Matches Apple's "Popovers adapt to Sheets in compact width" guideline, automatically switching to a32pxtop-radius bottom Liquid GlassDrawerwith 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:
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/popoverMulti-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:
Compact Settings Form
Ideal for toolbar or inspector controls, paired with PopoverClose to dismiss after applying changes:
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
| Prop | Type | Default | Description |
|---|---|---|---|
glass | boolean | true | Liquid Glass material reacting to glass tint; false renders a 100% opaque surface |
side | 'top' | 'bottom' | 'left' | 'right' | 'bottom' | Desktop popup side relative to trigger |
sideOffset | number | 8 | Desktop distance in px from trigger |
align | 'start' | 'center' | 'end' | 'center' | Desktop alignment along anchor axis |
alignOffset | number | 0 | Desktop alignment offset in px |
mobileTitle | React.ReactNode | — | Optional centered mobile Drawer title when <PopoverTitle> is not present |
className | string | — | Customize panel width or spacing (defaults to w-80 on desktop, full width on mobile) |
Pagination
Apple 27 Button-based paginator with an accent capsule for the active page, ghost buttons for other pages, and 44px mobile ↔ 32px desktop touch targets.
Progress
Apple 27 linear progress indicator featuring a capsule track with 0.5px hairline stroke, solid accent fill, sm/default sizes, and indeterminate shimmer animation.