DxMenu.HamburgerIconCssClass Property

Specify a CSS class for the hamburger button’s icon.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v21.2.dll

Declaration

[DefaultValue("")]
[Parameter]
public string HamburgerIconCssClass { get; set; }

Property Value

Type Default Description
String

String.Empty

A CSS class name.

Remarks

Menu items can be displayed in a hamburger menu in two cases:

  • If you set the DisplayMode to Mobile and set the Orientation to Horizontal.

  • If you set the DisplayMode to Desktop and set the CollapseItemsToHamburgerMenu property to true, menu items are collapsed into a hamburger menu when the width of the browser window changes and there is not enough space to display the items in the menu panel.

You can use the HamburgerButtonPosition and HamburgerIconCssClass properties to change the hamburger button’s position and icon.

<div class="card w-auto">
    <DxMenu Title="DevExpress"
            CollapseItemToIconMode="MenuCollapseItemToIconMode.Sequentially"
            CollapseItemsToHamburgerMenu="true"
            HamburgerButtonPosition="MenuHamburgerButtonPosition.Right"
            HamburgerIconCssClass="oi oi-menu">
        <Items>
            <DxMenuItem Text="Products" IconCssClass="oi oi-layers" />
            <DxMenuItem Text="Support" IconCssClass="oi oi-person" />
            <DxMenuItem Text="Documentation" IconCssClass="oi oi-book" />
            <DxMenuItem Text="Demos" IconCssClass="oi oi-monitor" />
            <DxMenuItem Text="Blogs" IconCssClass="oi oi-bell" />
            <DxMenuItem Text="Search" IconCssClass="oi oi-magnifying-glass" />
        </Items>
    </DxMenu>
</div>

Hamburger Button Position

Watch Video

See Also