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.

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 themeNames attribute to set a component theme.

Variant Description Supported By

primary

Makes the drawer toggle more prominent.

Aura

tertiary

Makes the drawer toggle less prominent.

Aura

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 CodeGenerate 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.

Elements