Modal dialog example

This example uses the native <dialog> element. The dialog is closed by default. Use the “Open dialog” button to open it. Keyboard support includes Tab navigation and Escape to close.

Example modal dialog

This is a modal dialog. Focus is moved into the dialog when it opens and restored to the trigger when it closes.

Optional: type something, then press “Save”.