A toggle component that controls the visibility a menu drawer.

  • XML element: drawerToggle

  • Java class: DrawerToggle


The drawerToggle component creates a toggle button that controls the opening and closing of the drawerLayout containing main menu items.

drawer toggle basic

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.


Choose among four color variants: default, success, error, and contrast. Combine the color variants with the primary theme to add extra emphasis.


Three size options are available: small, default, large.


Чтобы сгенерировать заглушку обработчика в Jmix Studio, используйте вкладку Handlers панели инспектора Jmix UI, или команду Generate Handler, доступную на верхней панели контроллера экрана и через меню CodeGenerate (Alt+Insert / Cmd+N).


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.