Modal
Focused dialog for confirmations and alerts that require user attention.
Options
| Property | Values | Default |
|---|---|---|
| variant | confirmation / alert | confirmation |
| size | s / m / l | m |
| dismissible | true / false | true |
| open | true / false | false |
Behaviors
- Backdrop overlay blocks page interaction while open.
- Focus is trapped inside the modal while open.
- Dismissible modals close on backdrop click, Escape, or close button.
- Non-dismissible modals require an explicit primary action.
Accessibility
- Uses the native
<dialog>element withshowModal()for built-in accessibility. - Focus is automatically trapped inside the dialog by the browser.
aria-labelledbyand optionalaria-describedbyconnect title and description.- Escape key dismisses via the native
cancelevent (when dismissible). - Background content is made inert automatically by the browser.