Drawer
Built on Samla’s Dialog, so it opens as a modal dialog with focus
trapping, Escape to close and a backdrop that closes on click. Any element
with data-dialog-open="<id>" opens it, and the header has a close button.
It slides in from its edge; under reduced motion it appears without the
slide.
Options
Section titled “Options”id: dialog id, matched bydata-dialog-open(required)title: heading at the top of the panel (required), also the dialog’s accessible nameplacement:end(default) orstart- Default slot: the scrolling body
footerslot: pinned to the bottom, for totals and actions
<Button data-dialog-open="contents">Contents</Button>
<Drawer id="contents" title="On this page"> <p>Links to each part of the page.</p> <Button slot="footer" href="/docs/">Read the docs</Button></Drawer>