From Documentation
Revision as of 07:22, 28 December 2023 by Hawk (talk | contribs) (→‎Position)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


  • Available for ZK:
  • http://www.zkoss.org/product/zkhttp://www.zkoss.org/whyzk/zkeeVersion ee.png

Since 9.0.0


A Drawer is a component that acts as a panel but sticks to the boundary of a web page. With this, you can make the page cleaner and put details into the Drawer for a better user experience.


In this example we dock a drawer on the right side and put detailed file information into the drawer. ZK-Drawer-Example.png


<button label="Show File Info" onClick="fi.open()"/>
<drawer id="fi" title="File information">
        <label value="Name"/>
        <label value="Size"/>
        1.8 Megabytes
        <label value="Dimensions"/>

Open / Close the Drawer

Both visible attribute and open/close methods allow you to open or close the Drawer.

Change Animation Speed

This component respects the data-animationspeed attribute, please see Data-AnimationSpeed




When enabled, the drawer will be opened automatically when the mouse cursor is near the page edge.

This feature is not yet supported on mobile devices.


Sets whether it is closeable by a user (displays the close button). If enabled, there is a button for users to close the drawer.

Note that even if closable is false, users can still click outside the drawer to close it.


Sets whether it is masked when the drawer is opened. By default, there is a translucent dark gray full-screen mask.

Note that even if mask is false, users can still click outside the drawer to close it.


Default: right

Sets the position of the drawer. Valid values are left, right, top and bottom.


Sets the title of this drawer. null means no title.

Supported Events

Event Type
Event: OpenEvent

Denotes that the user has opened or closed a component.

Note: unlike onClose, this event is only a notification. The client sends this event after opening or closing the component.

Supported Children


Use Cases

Version Description Example Location

Version History

Last Update : 2023/12/28

Version Date Content
9.0.0 September 2019 ZK-4365: Provide a drawer component

Last Update : 2023/12/28

Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.