drawerToggle
A toggle component that controls the visibility a menu drawer.
-
XML element:
drawerToggle
-
Java class:
DrawerToggle
Basics
The drawerToggle
component creates a toggle button that controls the opening and closing of the drawerLayout
containing main menu items.
To ensure users can access the main menu across the application, drawerToggle
is usually placed within the navigationBar
component of the main application view.
Theme Variants
Use the themeNames attribute to customize component’s color and size.
Attributes
id - alignSelf - ariaLabel - ariaLabelledBy - autofocus - classNames - clickShortcut - colspan - css - focusShortcut - height - maxHeight - maxWidth - minHeight - minWidth - tabIndex - themeNames - visible - width
Handlers
To generate a handler stub in Jmix Studio, use the Handlers tab of the Jmix UI inspector panel or the Generate Handler action available in the top panel of the view class and through the Code → Generate menu (Alt+Insert / Cmd+N). |
ClickEvent
The com.vaadin.flow.component.ClickEvent
is fired when the component is clicked. This handler must specify one of the following three subjects to detect the number of clicks related to the event.
-
click – fires the event whenever the component is clicked.
-
singleClick – fires the event after a timeout to ensure it is not a double click.
-
doubleClick – fires the event when the component is double-clicked.