Overlays
Modal
Adaptive overlay that renders as a bottom sheet on mobile and a centered dialog on desktop.
Adaptive Modal
Modals provide a focused overlay for critical tasks. They automatically adapt to the platform: a centered dialog on desktop and a draggable bottom sheet on mobile.
Sizing
Control the width on desktop to suit your content, from narrow alerts to wide data editors.
Properties
| Prop | Type | Default | Description |
|---|---|---|---|
isOpen | boolean | — | Controlled state of overlay visibility |
onClose | () => void | — | Callback function triggered when closing the overlay |
children | React.ReactNode | — | Main descriptive text or overlay children layout |
title | string | — | Title shown at the top of the modal |
description | string | — | Description text rendered below the title |
headerActions | React.ReactNode | — | Content rendered in the top-right corner — e.g. a close button |
footer | React.ReactNode | — | Content at the bottom — e.g. action buttons |
maxWidth | number | string | 520 | Max width of the dialog on desktop |
closeOnBackdrop | boolean | true | Prevent closing when the backdrop is clicked |
closeOnEscape | boolean | true | Prevent closing via Escape key |
noBackdrop | boolean | false | Render without a backdrop |
centered | boolean | false | Center children vertically |
portalTarget | HTMLElement | null | — | Portal target — defaults to document.body |
zIndex | number | 1000 | z-index override |
maxHeight | number | string | — | Max height of the modal body |