Skip to content

Drawer ​

Edge panel for filters, detail, and settings. It uses the same mask language as Modal: 40% black, mask z-index 3990, panel 4000. While open it locks body scroll and traps focus.

Demos ​

Right

Default placement is right. width defaults to 400.
Open right

Side panel content scrolls inside the body.

Left

placement="left". On viewports ≤640px, left and right drawers use calc(100% - 48px).
Open left

A narrower navigation pane.

Top

Top keeps a modest height so content below stays hinted. height defaults to 40vh.
Open top

A short banner drawer.

Bottom

Bottom uses a large top radius, the same sheet language as the date picker on small screens.
Open bottom

Bottom sheet content.

With footer

Slot footer for the same right-aligned actions as Modal.
Filters

Choose what stays visible.

ResetApply

Form filters

Body content scrolls. Fields use the same 34px control height as Input.
Open filters

No mask

show-mask="false" omits the mask and sets aria-modal="false". Escape still closes when closable.
Peek

No dim layer behind this panel.

Alpine ​

html
<div x-data="{ open: false }">
  <gk-button type="button" x-on:click="open = true">Filters</gk-button>
  <gk-drawer title="Filters" x-bind:open="open" x-on:update:open="open = $event.detail">
    <p>Edge panel</p>
  </gk-drawer>
</div>

API ​

Props ​

PropTypeDefault
openbooleanfalse
titlestring''
placement'left' | 'right' | 'top' | 'bottom''right'
widthnumber | string400
heightnumber | string40vh
closablebooleantrue
mask-closablebooleantrue
show-maskbooleantrue

width applies to left/right. height applies to top/bottom. A bare number is pixels.

Slots ​

NameDescription
defaultBody
headerExtra header content
footerActions

Events ​

NameDetail
update:openfalse when dismissed
closeDismissed

CSS parts ​

mask, panel, header, title, close, body, footer.

The panel enters over 180ms with a 12px translate from its edge. It shares Modal’s blocking stack, so later dialogs and drawers sit 10 z-index steps higher.