drawerToggle

drawerToggle controls the visibility of an application 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 apply one or more theme variants.

Variant Description Supported By

primary

Makes the drawer toggle more prominent.

Aura

tertiary

Makes the drawer toggle less prominent.

Aura

Attributes

The following shared attributes are supported by drawerToggle:

Handlers

The following handlers are specific to drawerToggle:

Name Description

ClickEvent

The com.vaadin.flow.component.ClickEvent is fired when the component is clicked.

The following shared handlers are supported by drawerToggle:

Elements

A drawerToggle can include tooltip and icon as its nested elements.