Drawer
Introduction
A drawer slides in from the edge of a parent window and covers part of its content. You can perform operations in the drawer without leaving your current task. When you finish, you can smoothly return to the original task.
Use a drawer to provide an additional panel for controlling the parent window's content. This panel appears on demand. For example, you can use it to control the display style of the interface or to add content to the interface.
Use a drawer to insert a temporary task into the current workflow, or to create or preview additional content. For example, you can use it to display the terms of a protocol or to create child objects.
For more information, see Pop-up windows and drawers.
Configuration items
Category |
Configuration |
Example |
Description |
Display area |
Top |
Specifies whether to show the drawer's top title bar. |
|
Bottom |
Specifies whether to show the drawer's bottom action bar. |
||
Interaction |
Close on mask click |
When enabled, clicking the mask triggers the |
|
Close on ESC |
When enabled, pressing the ESC key triggers the |
||
Destroy child nodes on close |
By default, child nodes are destroyed when the drawer is closed. For example, if a drawer contains an Image component, destroying the child nodes causes the image to be re-requested each time the drawer opens. If the child nodes are kept, the image is requested only the first time the drawer opens. |
||
Style |
Hide drawer |
Controls the default display state of the drawer. When set to |
|
Size |
Sets the display size of the drawer. |
||
Drawer position |
Sets the display position of the drawer. |
||
Show mask |
Specifies whether to show the mask. |
||
Show Close button |
Specifies whether to show the Close button in the top bar. |
||
CSS styles |
Background color |
The background color of the drawer. For more information, see Common properties. |
|
Top background color |
The background color of the top area. For more information, see Common properties. |
||
Top padding |
The padding of the top area. For more information, see Common properties. |
||
Top bottom border |
|
The bottom border of the top area. For more information, see Common properties. |
|
Content area background color |
The background color of the content area. For more information, see Common properties. |
||
Content area padding |
The padding of the content area. For more information, see Common properties. |
||
Bottom background color |
The background color of the bottom area. For more information, see Common properties. |
||
Bottom padding |
The padding of the bottom area. For more information, see Common properties. |
||
Bottom top margin |
|
The bottom border of the bottom area. For more information, see Common properties. |
|
Close button left margin |
The left margin between the Close button and the title. |
||
Close button right margin |
The right margin between the Close button and the title. |
Properties and methods
Name |
Type |
Example |
Description |
hidden |
boolean |
|
Indicates whether the component is currently hidden. |
hide |
func |
|
Hide Drawer |
show |
func |
|
Shows the drawer. |
toggleHidden |
func |
|
Toggles the hidden state of the drawer. |
Event callbacks
Configuration |
Description |
Triggered when the mask or Close button is clicked, or when the ESC key is pressed. By default, a new drawer triggers the |
|
|
The event triggered after the drawer's show animation is complete. |
The event triggered after the drawer's close animation is complete. |


