Drawer
A panel that slides in from the right edge, also on the native dialog element.
| Name | Type | What it does |
|---|---|---|
drawer | component | On a <dialog>. Same API as modal |
Drawer
<button class="btn" onclick="document.getElementById('demo-drawer').showModal()">Open drawer</button>
<dialog class="drawer" id="demo-drawer">
<div style="display: grid; gap: 1rem">
<p class="card-title">Filters</p>
<label style="display: flex; align-items: center; gap: 0.5rem"><input class="toggle" type="checkbox" checked> Night only</label>
<form method="dialog"><button class="btn btn-primary btn-block">Apply</button></form>
</div>
</dialog>