:modal
Widely availableSince 202296% of users
Targets an element that is in a 'modal' state, such as a <dialog> element opened with the showModal() method.
What's modern
From web-features, MDN's browser data and our snippets, checked dailyModernIn every major browser since September 2022. Widely available since March 2025.
See how modern your own CSS is.Check your CSS →
Quick example
dialog:modal {
/* Adds a subtle drop shadow to the dialog when it is in modal mode */
box-shadow: 0 0 50px rgba(0,0,0,0.5);
border: none;
}:modal browser support
BaselineWidely availableThis feature is well established and works across many devices and browser versions. It has been available across browsers since 2022.Safe to use without fallbacks.
Usage96%of people can use this4% use a browser without it.
Browsers
105+
103+
15.6+
105+Mobile
105+Android
103+Android
15.6+iOS