Dialog
Apple Liquid Glass centered dialog with unified desktop and mobile modal presentation, a built-in maximize-to-fullscreen toggle, and fixed header/footer layout with scrollable body.
Fully compatible with the standard shadcn/ui JSX API (<Dialog> / <DialogTrigger> / <DialogContent> / <DialogHeader> / <DialogBody> / <DialogTitle> / <DialogDescription> / <DialogFooter> / <DialogClose>), delivering a unified centered Liquid Glass modal across desktop and mobile:
- Unified Centered Modal: Powered by
@base-ui/react/dialog, rendering a centered26px-radius Liquid Glass window on both desktop and mobile with soft inner specular highlights, circular top-right controls, and live--liquid-glass-tintreactivity. - Maximize to Fullscreen: A built-in maximize/restore button sits to the left of the close button, expanding the dialog to fill the entire viewport (with mobile safe-area padding) and restoring on click.
- Fixed Header & Footer:
DialogHeaderstays pinned at the top andDialogFooterstays pinned at the bottom while the middle content automatically takes all remaining height and scrolls independently when overflowing.
Live Preview
Open the dialog to try the centered Liquid Glass modal and top-right maximize toggle, or adjust the sidebar Glass Opacity slider:
Installation (Shadcn Registry)
# Install via the configured @apple-liquid namespace (includes button and liquid-glass)
npx shadcn@latest add @apple-liquid/dialog
# Or install directly via URL
npx shadcn@latest add https://your-domain.com/r/dialog.jsonShare Settings Dialog
Compose Switch, Button, and subtle grouped cards cleanly inside the Liquid Glass surface, or enable showCloseButton on DialogFooter:
Scrollable Long Content & Maximize
Extend width via className (e.g. md:max-w-lg) while the header and footer stay fixed and the middle content fills the remaining height with independent scrolling:
Usage
import { Button } from '@/components/ui/button';
import {
Dialog,
DialogClose,
DialogContent,
DialogDescription,
DialogFooter,
DialogHeader,
DialogTitle,
DialogTrigger,
} from '@/components/ui/dialog';
export function Example() {
return (
<Dialog>
<DialogTrigger render={<Button variant="secondary">Open Dialog</Button>} />
<DialogContent>
<DialogHeader>
<DialogTitle>Edit Profile</DialogTitle>
<DialogDescription>
Changes will sync across all of your devices.
</DialogDescription>
</DialogHeader>
<DialogFooter>
<DialogClose render={<Button variant="secondary" />}>
Cancel
</DialogClose>
<DialogClose render={<Button variant="default" />}>
Save Changes
</DialogClose>
</DialogFooter>
</DialogContent>
</Dialog>
);
}Props API
DialogContent
| Prop | Type | Default | Description |
|---|---|---|---|
glass | boolean | true | Liquid Glass material reacting to glass tint; false renders a 100% opaque surface |
showCloseButton | boolean | true | Render the circular Apple close button top-right |
showMaximizeButton | boolean | true | Render the maximize/restore button to the left of the close button |
maximized | boolean | — | Controlled maximized state expanding the dialog to fill the viewport |
defaultMaximized | boolean | false | Initial uncontrolled maximized state |
onMaximizedChange | (maximized: boolean) => void | — | Callback fired when the maximized state changes |
className | string | — | Customize panel width, radius, or spacing (defaults to md:max-w-md when not maximized) |
DialogFooter
| Prop | Type | Default | Description |
|---|---|---|---|
showCloseButton | boolean | false | Automatically append a secondary "Close" button in the footer |
Language & Text
Dialog accepts locale and messages, which apply to all of its parts and the overlays it opens and win over the global <LiquidGlassProvider locale messages>. To override the text globally, put it under messages.dialog on the provider. See Liquid Glass → Global settings.
| Prop | Type | Description |
|---|---|---|
locale | LiquidGlassLocaleInput | UI language of this component (any BCP 47 tag; unsupported ones fall back to English) |
messages | Partial<DialogMessages> | Text overrides, merged over the built-in text and the global messages.dialog |
| Key | Built-in text (English) |
|---|---|
close | Close |
maximize | Maximize |
restore | Restore |
ContextMenu
Responsive Apple Liquid Glass context menu opening a macOS 27 floating Liquid Glass menu on desktop right-click, and a swipe-to-dismiss iOS 27 bottom Liquid Glass Drawer with submenu drill-down on mobile long-press.
Direction
Provides right-to-left (RTL) text direction context for Arabic, Hebrew, and other RTL interfaces so Slider, Switch, and Base UI controls mirror automatically.