Dialog
A modal dialog component built on Base UI primitives with support for multiple positions, drag-to-dismiss, and nested dialogs.Compound Components
Dialog.Root
The root container that manages dialog state.Controlled open state. When provided, the dialog becomes controlled.
Uncontrolled default open state.
Callback fired when the open state changes.
Whether the dialog is modal (blocks interaction with the rest of the page).
Dialog.Trigger
The trigger element that opens the dialog.Additional CSS classes to apply.
Merge props onto the child element instead of rendering a button.
Dialog.Portal
Portals the dialog content to the end of the document body.Whether to keep the dialog mounted in the DOM when closed. When
false, uses AnimatePresence for mount/unmount animations.The container element to portal into. Defaults to
document.body.Dialog.Backdrop
The backdrop overlay behind the dialog.Additional CSS classes to apply. Default:
"fixed inset-0 z-50 bg-utility-backdrop"Dialog.Popup
The dialog popup container with positioning and animation.center: Centered modal (scales on desktop, bottom sheet on mobile)right: Right-side panel (full height on desktop, bottom sheet on mobile)sheet: Bottom sheet on all screen sizes
Enable drag-to-dismiss for sheet mode. Only works when
position="sheet" or on mobile.Additional CSS classes to apply.
- Mobile (< 640px): All positions become bottom sheets with 8px padding
- Desktop: Each position has specific behavior (center, right panel, or bottom sheet)
- Center: Scale from 0.95 to 1 with fade
- Right: Slide in from right
- Sheet: Slide up from bottom
- Nested dialogs scale down to 0.94 and dim to 60% brightness
Dialog.Content
Inner content wrapper with shadow and rounded corners.Additional CSS classes to apply.
Dialog.DragIndicator
Visual drag handle (horizontal pill). Only shown whenswipeable is enabled and in sheet mode.
Additional CSS classes to apply.
Dialog.Header
Header section with title and close button. Automatically includes drag indicator whenswipeable is enabled.
Additional CSS classes to apply.
Dialog.Title
Accessible dialog title.Additional CSS classes to apply. Default: Large semibold text with strong content color.
Dialog.Description
Accessible dialog description.Additional CSS classes to apply. Default: Small text with subtle content color.
Dialog.Close
Close button (renders X icon by default, or custom children).Additional CSS classes to apply.
Custom render function for advanced use cases.
Dialog.Body
Scrollable content area.Additional CSS classes to apply. Default: 24px padding with vertical scroll.
Dialog.Footer
Footer section for action buttons.Additional CSS classes to apply.
- Desktop: Right-aligned buttons with 8px gap
- Mobile: Full-width buttons side by side
- Padding: 16px vertical, 24px horizontal