v1.2.0

Drawer

Navigation drawers provide access to destinations in your app. Side sheets are surfaces containing supplementary content that are anchored to the left or right edge of the screen.

Temporary (Left)

Open Left Drawer
Menu

Temporary (Right)

Open Right Drawer
Filters

Temporary (Bottom)

Open Bottom Drawer
Options
Share Get Link Edit Delete
<me-button id="open-drawer">Open Drawer</me-button> <me-drawer id="my-drawer" anchor="left"> <div style="padding:16px;min-width:250px"> <!-- drawer content --> </div> </me-drawer> <script> const drawer = document.getElementById('my-drawer'); document.getElementById('open-drawer').addEventListener('click', () => { drawer.open = true; }); drawer.addEventListener('me-close', () => { drawer.open = false; }); </script>

API

AttributeTypeDefaultDescription
openbooleanfalseWhether the drawer is open.
anchorleft | right | top | bottomleftSide the drawer opens from.
varianttemporary | persistent | permanenttemporaryDrawer behavior variant.

Events

EventDetailDescription
me-close{ reason }Fired when backdrop is clicked or Escape is pressed.