matchMedia
Safe to use with polyfillapimatchMedia provides a JavaScript API to see if a media query will succeed.
- Verdict
- Safe to use
- Category
- JavaScript APIs
- Browser support
- Can I Use
- Works in
- all modern browsers
Should you use matchMedia in 2026?
MatchMedia.js provides a shim for unsupported browsers. If you want a shim that is responsive to window resizing, you can use this fork, though it's limited to browsers that support CSS Transitions.
Please