Skip to content

zk-drawer ​

A panel that slides from a side, a native <dialog>.

Props ​

PropTypeDefaultDescription
idstringrequiredIdentifier
titlestring|nullnullTitle
sidestring'right'left, right, top or bottom: data-side
closedbystring'any'any, closerequest or none
closeLabelstring'Close'Accessible name of the close button
classstring|nullnullCSS class(es) merged onto the root element

Undeclared attributes forward to the root element.

Slots ​

SlotDescription
defaultBody
footerFooter

It opens like the modal. The slide is yours: .drawer[data-side="left"] and the size with --zk-drawer-size. Class hooks: drawer, drawer-header, drawer-title, drawer-close, drawer-body, drawer-footer.

Examples ​

blade
<button commandfor="menu" command="show-modal">Menu</button>

<x-zk-drawer id="menu" title="Menu" side="left">
    <x-zk-nav>...</x-zk-nav>
</x-zk-drawer>

Documentation of 3.2.0 , built from c93e21f on 3.2.0 by pipeline #2919741884 on 2026-10-06.