Browser support
The target is Baseline newly available. Newer features are used behind feature detection, with a small fallback where the library depends on them. No polyfills ship in the bundle.
What your browser does natively
Section titled “What your browser does natively”Who covers what
Section titled “Who covers what”| Feature | Native | Fallback |
|---|---|---|
closedby="any" |
Light dismiss | lightDismiss(), inside enhanceDialog() and <surface-drawer> |
| Exit transitions out of the top layer | overlay and transition-behavior: allow-discrete |
routeCloseRequests() and closeAnimated() via data-closing |
| Entry transitions | @starting-style |
None. The drawer appears without sliding in. |
Invoker commands (commandfor) |
Opens and closes from HTML | Not included. Load a polyfill (below). |
<details> open/close animation |
::details-content and interpolate-size |
<surface-accordion> animates with Web Animations |
:state() |
surface-drawer:state(open) |
None. Style dialog[open] instead. |
:modal |
Modal detection | Treats any open dialog as modal. |
Invoker commands polyfill
Section titled “Invoker commands polyfill”Load invokers-polyfill only where it is missing:
if (!("commandForElement" in HTMLButtonElement.prototype)) { import("invokers-polyfill")}Deliberate deviations from platform guidance are recorded as ADRs.