GPUI Deck

Dialog

Open/close state, native modal metadata, background input isolation, initial focus, dismissal, and focus restoration.

Rendered by GPUI’s web backend from the real component. Requires a browser with WebGPU.

Dialog::new(&state) is modal: it exposes native modal metadata and blocks background pointer/wheel input even without a decorative backdrop. The application supplies the accessible name, popup and visual backdrop. Keep it mounted under Root so Tab and Shift-Tab remain in the active dialog.

The existing state owns opening, initial focus, Escape and return focus. Backdrop press dismissal is provided when a backdrop is supplied and enabled; omitting that visual element still keeps background controls inert. Popover is non-modal and does not set the modal flag. AlertDialog, Drawer and Sheet reuse Dialog.