Modal Dialog Component

Example modal (closed by default). The open button has class="trigger".

Try opening the modal, use Tab to cycle focus, Esc to close, and click the overlay.

Background elements remain interactive unless the modal is open.

Example link