The <dialog> element ships native modal behaviour: show() for non-modal, showModal() for blocking. The browser handles focus trapping, Escape to close, and the top layer that escapes overflow:hidden.
Style the backdrop with ::backdrop. Animate it with the @starting-style rule for entry transitions.
It is now supported across Chrome, Firefox, and Safari — the right default for any modal pattern in 2026.