Capítulo 21 de 51
A general-purpose modal (by default) window — the base primitive most custom "Modal" components build from — sharing AlertDialog's full anatomy (Backdrop/Viewport/Popup/Title/Description/Close, Handle/createHandle for detached triggers) but for non-interrupting content; reach for Drawer instead once gesture support or snap points are needed.
Root → Trigger, Portal → Backdrop, Viewport → Popup → Title, Description, Close. Identical shape to AlertDialog (ch012).modal prop: default true. false disables the focus-trap/outside-inert behavior for a non-blocking dialog that coexists with page interaction.disablePointerDismissal: prevents closing via outside pointer press — keep the dialog open until an explicit action, without going as far as AlertDialog's semantics.Handle/createHandle(), handle prop on Root/Trigger, triggerId/defaultTriggerId, payload on Trigger.data-nested/data-nested-dialog-open attributes and --nested-dialogs variable as AlertDialog.| Part | Notable props | Notable data attributes |
|---|---|---|
Root | open/onOpenChange, modal, disablePointerDismissal, handle, actionsRef, triggerId/defaultTriggerId | — |
Trigger | handle, payload, id, nativeButton | data-popup-open, data-disabled |
Backdrop | forceRender | data-open, data-closed, data-starting-style/data-ending-style |
Popup | initialFocus, finalFocus | data-open, data-closed, data-nested, data-nested-dialog-open, animation attrs |
Close | nativeButton | data-disabled |
modal={false} for non-blocking auxiliary panels (e.g. a persistent inspector) that should coexist with normal page interaction rather than trapping focus.initialFocus/finalFocus focus-management guidance.