Components / component
Modal Dialog
A modal dialog built on the native dialog element, with a scaling panel, a fading backdrop, and focus handled by the browser.

Implementation
A modal dialog built on the native dialog element, with a scaling panel, a fading backdrop, and focus handled by the browser.
- Framework
- React 19.3.1 with TypeScript
- Motion
- Native CSS and browser APIs. No GSAP required.
- Available modes
- build
- Version
- 1.0.0 · published
Source code
Quality evidence
Export tested in 2 consumer projects with chromium, firefox, webkit. Evidence recorded on .
Changelog
v1.0.0 · A modal dialog built on the native dialog element, with a scaling panel, a fading backdrop, and focus handled by the browser.
Frequently asked questions
Why is it built on the native dialog element?
The browser then provides the focus trap, the inert page behind it, Escape handling and returning focus to the trigger, all of which are hard to get right by hand.
What happens to scrolling behind the dialog?
The page is locked while the dialog is open and released when it closes. Pass lockScroll false if a scroll library handles it.