Modal dialog example

Open the dialog

This example uses the native <dialog> element. When open, focus moves into the dialog and stays there until it is closed.

Notes

  • Press Escape to close.
  • Use Tab and Shift+Tab to move between controls.

Confirm your choice

This is an example modal dialog. Choose an action below, or close the dialog to return to the page.