Dialog
A named native modal dialog with inert background and managed focus.
Preview
Use Dialog
Dialog is a named export of @flood-md/react. Connect the package once, then import what you use.
Design notes
- Uses native showModal, not a simulated modal div.
- Escape closes the top layer; outside closing can be disabled independently. Tab remains inside the dialog.
- Closed content unmounts. Forward trigger props/ref; initialFocusRef can select a safe initial control. Modern native dialog support is required.
API reference
View TypeScript source