- Why use <dialog> instead of a <div> modal?
- <dialog> is a native HTML element with built-in focus trapping, ESC-to-close, and a ::backdrop pseudo-element. Far less custom code than a div-based modal.
- Browser support for <dialog>?
- All modern browsers since 2022. A polyfill exists for older ones but the native API covers 95%+ of users today.
- Can I animate open/close?
- Yes — @starting-style plus transition-behavior:allow-discrete lets you animate display:none transitions. The tool generates the CSS for smooth entrance/exit.
- What about the backdrop?
- The native ::backdrop pseudo-element. Style it with blur, tint, or opacity — the tool includes a few presets.