Component referenceVersion Draft
Modal
Modal interrupts the current task for a focused decision or edit. Give every dialog a clear title and a reachable close action.
Design notes
Focus stays inside the dialog while open and returns to the trigger when closed. Keep a recoverable draft until the user confirms the change.
Modal design
Inspect the original component, variants and visual details.
Playground
Playgrounddemo.tsx
API
Modal
A modal dialog with required title and description. Focus is managed by Radix; outside pointer interaction does not dismiss it. Escape and close actions do.
No custom imperative methods. Event callbacks are listed as properties.
ModalClose
Closes the nearest matching overlay. Use asChild with one ref-capable action element, or render the default native button.
No custom imperative methods. Event callbacks are listed as properties.