Drawer
A slide-in panel built on the native <dialog> element. The close button floats at the top right. Default border radius is 2px — use rounded-* utilities to override. Slides from the end (right) by default, with --start and --bottom direction modifiers.
Default drawer
index.htmlhtml
<dialog class="ln-drawer" data-ln-dismissible open>
<button class="ln-drawer__close" data-ln-dismiss aria-label="Close">×</button>
<div class="ln-drawer__header">
<h3 class="ln-drawer__title">Drawer title</h3>
</div>
<div class="ln-drawer__body">
<p>Drawer body content goes here. It scrolls when the content overflows the available height.</p>
</div>
<div class="ln-drawer__footer">
<button class="ln-button ln-button--ghost">Cancel</button>
<button class="ln-button ln-button--solid">Save changes</button>
</div>
</dialog>Reference
| Class | Description | Responsive |
|---|---|---|
.ln-drawer | Drawer container (applied to <dialog>) | No |
.ln-drawer__close | Close button | No |
.ln-drawer__header | Header with bottom border | No |
.ln-drawer__title | Drawer heading | No |
.ln-drawer__body | Scrollable body area | No |
.ln-drawer__footer | Footer with top border | No |
.ln-drawer--start | Slide in from the left | No |
.ln-drawer--bottom | Slide up from the bottom | No |
.ln-drawer--sm | 320px width | No |
.ln-drawer--md | 400px width (default) | No |
.ln-drawer--lg | 560px width | No |