Navigation
Drawer
A panel that slides in from the side of the screen over the page: filters, details of a row, or the navigation on a small screen. It is a <kui-dialog> whose dialog has .kui-dialog--drawer (from the end) or .kui-dialog--drawer-start (from the start).
A drawer is a modal dialog: focus stays inside, the page behind is dimmed and inert, Escape closes it and focus returns to the button that opened it. It is as tall as the window and its body scrolls. For a panel that comes up from the bottom of a phone, use the sheet.
Examples
Filters from the end
Press the button. The drawer comes in from the right; Tab moves through its fields and stays inside; Escape or a press on the dimmed page closes it.
<button class="kui-button" type="button" data-kui-open="drawer-filters"><svg class="kui-icon" aria-hidden="true"><use href="kit/icons.svg#filter"></use></svg><span>Filters</span></button>
<kui-dialog id="drawer-filters">
<dialog class="kui-dialog kui-dialog--drawer" aria-labelledby="drawer-filters-title">
<div class="kui-dialog__head">
<h2 class="kui-dialog__title" id="drawer-filters-title">Filter cases</h2>
<button class="kui-button kui-button--icon kui-button--ghost kui-dialog__close" type="button" data-kui-close><svg class="kui-icon" aria-hidden="true"><use href="kit/icons.svg#close"></use></svg></button>
</div>
<div class="kui-dialog__body">
<div class="kui-field">
<label class="kui-label" for="drawer-court">Court</label>
<select class="kui-select" id="drawer-court">
<option>All courts</option>
<option>Osnovni sud u Novom Sadu</option>
<option>Viši sud u Beogradu</option>
<option>Privredni sud u Nišu</option>
</select>
</div>
<fieldset class="kui-fieldset">
<legend class="kui-label">State</legend>
<label class="kui-check"><input class="kui-checkbox" type="checkbox" checked><span>Open</span></label>
<label class="kui-check"><input class="kui-checkbox" type="checkbox"><span>Waiting for the court</span></label>
<label class="kui-check"><input class="kui-checkbox" type="checkbox"><span>Closed</span></label>
</fieldset>
</div>
<div class="kui-dialog__foot">
<button class="kui-button" type="button" data-kui-close="reset">Clear</button>
<button class="kui-button kui-button--primary" type="button" data-kui-close="apply">Show 24 cases</button>
</div>
</dialog>
</kui-dialog>
Navigation from the start
.kui-dialog--drawer-start comes in from the left. Use it for an application’s sections on a tablet, where the side navigation does not fit.
<button class="kui-button kui-button--icon" type="button" data-kui-open="drawer-nav" aria-label="Open the navigation"><svg class="kui-icon" aria-hidden="true"><use href="kit/icons.svg#panel-left"></use></svg></button>
<kui-dialog id="drawer-nav">
<dialog class="kui-dialog kui-dialog--drawer-start" aria-labelledby="drawer-nav-title">
<div class="kui-dialog__head">
<h2 class="kui-dialog__title" id="drawer-nav-title">Kancelarija Đorđević</h2>
<button class="kui-button kui-button--icon kui-button--ghost kui-dialog__close" type="button" data-kui-close><svg class="kui-icon" aria-hidden="true"><use href="kit/icons.svg#close"></use></svg></button>
</div>
<div class="kui-dialog__body">
<nav class="kui-sidenav kui-sidenav--inline" aria-label="Sections">
<ul class="kui-sidenav__list">
<li><a class="kui-sidenav__link" href="#drawer-inbox" aria-current="page"><svg class="kui-icon" aria-hidden="true"><use href="kit/icons.svg#inbox"></use></svg><span class="kui-sidenav__label">Inbox</span><span class="kui-sidenav__count">12</span></a></li>
<li><a class="kui-sidenav__link" href="#drawer-cases"><svg class="kui-icon" aria-hidden="true"><use href="kit/icons.svg#briefcase"></use></svg><span class="kui-sidenav__label">Cases</span></a></li>
<li><a class="kui-sidenav__link" href="#drawer-cal"><svg class="kui-icon" aria-hidden="true"><use href="kit/icons.svg#calendar"></use></svg><span class="kui-sidenav__label">Calendar</span></a></li>
<li><a class="kui-sidenav__link" href="#drawer-set"><svg class="kui-icon" aria-hidden="true"><use href="kit/icons.svg#settings"></use></svg><span class="kui-sidenav__label">Settings</span></a></li>
</ul>
</nav>
</div>
</dialog>
</kui-dialog>
Details of a row
A drawer keeps the list visible beside it on a wide screen, so a person can check one record after another. Only one drawer is open at a time.
<button class="kui-button kui-button--link" type="button" data-kui-open="drawer-row">INV-2026-0142, Đorđević d.o.o.</button>
<kui-dialog id="drawer-row">
<dialog class="kui-dialog kui-dialog--drawer" aria-labelledby="drawer-row-title">
<div class="kui-dialog__head">
<h2 class="kui-dialog__title" id="drawer-row-title">Invoice INV-2026-0142</h2>
<button class="kui-button kui-button--icon kui-button--ghost kui-dialog__close" type="button" data-kui-close><svg class="kui-icon" aria-hidden="true"><use href="kit/icons.svg#close"></use></svg></button>
</div>
<div class="kui-dialog__body">
<dl class="kui-kv">
<div><dt>Client</dt><dd>Đorđević d.o.o., Kragujevac</dd></div>
<div><dt>Issued</dt><dd>3 November 2026</dd></div>
<div><dt>Due</dt><dd>3 December 2026</dd></div>
<div><dt>Amount</dt><dd>184 500,00 RSD</dd></div>
<div><dt>State</dt><dd><span class="kui-badge kui-badge--warn">Waiting for payment</span></dd></div>
</dl>
</div>
<div class="kui-dialog__foot">
<button class="kui-button" type="button"><svg class="kui-icon" aria-hidden="true"><use href="kit/icons.svg#download"></use></svg><span>PDF</span></button>
<button class="kui-button kui-button--primary" type="button">Send a reminder</button>
</div>
</dialog>
</kui-dialog>
Classes and attributes
kui-dialog- The element that opens and closes the drawer; give it an id.
dialog.kui-dialog.kui-dialog--drawer- A drawer from the end (the right in left-to-right text).
.kui-dialog--drawer-start- A drawer from the start (the left).
.kui-dialog__head, __title, __close, __body, __foot- The parts, the same as a dialog. The body scrolls; the head and the foot stay.
data-kui-open="ID"- On the button that opens it.
data-kui-close="VALUE"- On a button that closes it; the value is in the kui-close event.
static- On kui-dialog: a press outside does not close it.
Keyboard
- Enter or Space
- On the button, opens the drawer.
- Tab or Shift + Tab
- Moves through the drawer and stays inside it.
- Escape
- Closes the drawer; focus returns to the button that opened it.
Accessibility
- A native modal dialog: the browser keeps focus inside and hides the page behind from screen readers.
- Name it with aria-labelledby pointing at its title.
- The icon-only close button gets the keyed name “Close” from the kit.
- Focus goes back to the opening button when it closes, so the person continues where they were.
- The slide-in is a short movement; with reduced motion asked for, the kit’s motion tokens are zero.
Do and do not
Do
- Use a drawer for a task beside the page: filters, details, a short edit.
- Keep the main action in the foot, where it stays visible while the body scrolls.
- Say on the main button what happens: “Show 24 cases”.
Do not
- Do not open a drawer from a drawer.
- Do not put a long, multi-step form in a drawer; give it its own page.
- Do not use a drawer for a message that needs an answer; use a dialog.