v1.2.0

Backdrop

The Backdrop component overlays the entire screen with a translucent dark overlay, typically used to indicate a blocking state or focus attention on a specific element.

Basic Backdrop

Show Backdrop
<me-backdrop id="backdrop"></me-backdrop> <script> document.querySelector('#show-btn').addEventListener('click', () => { document.querySelector('#backdrop').setAttribute('open', ''); }); document.querySelector('#backdrop').addEventListener('me-close', () => { document.querySelector('#backdrop').removeAttribute('open'); }); </script>

Invisible Backdrop

The invisible attribute removes the dark overlay while still blocking pointer events.

Show Invisible Backdrop
<me-backdrop invisible></me-backdrop>

API

AttributeTypeDefaultDescription
openbooleanfalseWhether the backdrop is visible and active.
invisiblebooleanfalseTransparent backdrop (no dark overlay).

Events

EventDescription
me-closeFired when the backdrop is clicked.