A panel that slides in from an edge, built on the native <dialog> element. temporary (default) shows a modal with a backdrop and focus trap; persistent shows a non-modal panel that doesn't block the page.
The placement attribute picks the edge — start, end (default), top, or
bottom.
StartSlides from the start edge.EndSlides from the end edge.TopSlides from the top.BottomSlides from the bottom.
<nana-button onclick="this.nextElementSibling.show()">Start</nana-button><nana-drawer placement="start" label="Start" close-button> Slides from the start edge.</nana-drawer><nana-button onclick="this.nextElementSibling.show()">End</nana-button><nana-drawer placement="end" label="End" close-button> Slides from the end edge.</nana-drawer><nana-button onclick="this.nextElementSibling.show()">Top</nana-button><nana-drawer placement="top" label="Top" close-button> Slides from the top.</nana-drawer><nana-button onclick="this.nextElementSibling.show()">Bottom</nana-button><nana-drawer placement="bottom" label="Bottom" close-button> Slides from the bottom.</nana-drawer>
size sets the panel’s width (start/end) or height (top/bottom):
sm (16rem), md (20rem, default), lg (28rem), xl (36rem), or full
(100%). Override any of them with --nana-drawer-size.
SmallThe small drawer.MediumThe default drawer.LargeThe large drawer.XLThe extra-large drawer.FullThe full-size drawer.
<nana-button onclick="this.nextElementSibling.show()">Small</nana-button><nana-drawer placement="end" size="sm" label="Small · 16rem" close-button> The small drawer.</nana-drawer><nana-button onclick="this.nextElementSibling.show()">Medium</nana-button><nana-drawer placement="end" size="md" label="Medium · 20rem" close-button> The default drawer.</nana-drawer><nana-button onclick="this.nextElementSibling.show()">Large</nana-button><nana-drawer placement="end" size="lg" label="Large · 28rem" close-button> The large drawer.</nana-drawer><nana-button onclick="this.nextElementSibling.show()">XL</nana-button><nana-drawer placement="end" size="xl" label="XL · 36rem" close-button> The extra-large drawer.</nana-drawer><nana-button onclick="this.nextElementSibling.show()">Full</nana-button><nana-drawer placement="end" size="full" label="Full · 100%" close-button> The full-size drawer.</nana-drawer>