RadzenMenu Class

A horizontal menu component with support for nested submenus, icons, and responsive behavior. RadzenMenu provides a classic menu bar for navigation, typically used in application headers or toolbars. Displays menu items horizontally with dropdown submenus. Supports multi-level nested menus via RadzenMenuItem child items, automatic navigation via Path property or custom Click handlers, icons displayed alongside menu item text, responsive design that automatically collapses to a hamburger menu on small screens (configurable), click-to-open or hover-to-open interaction modes, keyboard navigation (Arrow keys, Enter, Escape) for accessibility, and visual separators between menu items. Use for application navigation bars, command menus, or toolbar-style interfaces. Menu items are defined using RadzenMenuItem components as child content.

Inheritance

Object

ComponentBase

RadzenComponent

RadzenComponentWithChildren

RadzenMenu

Implements

IComponent

IHandleEvent

IHandleAfterRender

Namespace: Radzen.Blazor

Assembly: Radzen.Blazor.dll

Syntax

public class RadzenMenu : RadzenComponentWithChildren, IComponent, IHandleEvent, IHandleAfterRender

Examples

Basic menu with navigation:

<RadzenMenu>
    <RadzenMenuItem Text="Home" Path="/" Icon="home" />
    <RadzenMenuItem Text="Data">
        <RadzenMenuItem Text="Orders" Path="/orders" />
        <RadzenMenuItem Text="Customers" Path="/customers" />
    </RadzenMenuItem>
    <RadzenMenuItem Text="Reports" Path="/reports" />
</RadzenMenu>

Menu with click handlers:

<RadzenMenu Click=@OnMenuClick>
    <RadzenMenuItem Text="File">
        <RadzenMenuItem Text="New" Value="new" Icon="add" />
        <RadzenMenuItem Text="Open" Value="open" Icon="folder_open" />
        <RadzenMenuItem Text="Save" Value="save" Icon="save" />
    </RadzenMenuItem>
</RadzenMenu>

Constructors

RadzenMenulink

A horizontal menu component with support for nested submenus, icons, and responsive behavior. RadzenMenu provides a classic menu bar for navigation, typically used in application headers or toolbars. Displays menu items horizontally with dropdown submenus. Supports multi-level nested menus via RadzenMenuItem child items, automatic navigation via Path property or custom Click handlers, icons displayed alongside menu item text, responsive design that automatically collapses to a hamburger menu on small screens (configurable), click-to-open or hover-to-open interaction modes, keyboard navigation (Arrow keys, Enter, Escape) for accessibility, and visual separators between menu items. Use for application navigation bars, command menus, or toolbar-style interfaces. Menu items are defined using RadzenMenuItem components as child content.

Declaration
public RadzenMenu()

Properties

AriaLabellink

Gets or sets the menu aria label text.

Declaration
public string AriaLabel { get; set; }
Property Value
Type Description
stringGets or sets the menu aria label text.

Clicklink

Gets or sets the click callback.

Declaration
public EventCallback<MenuItemEventArgs> Click { get; set; }
Property Value
Type Description
EventCallback<MenuItemEventArgs>Gets or sets the click callback.

ClickToOpenlink

Gets or sets the interaction mode for opening submenus. When true, submenus open on click. When false, submenus open on hover (desktop) and click (touch devices).

Declaration
public bool ClickToOpen { get; set; }
Property Value
Type Description
boolGets or sets the interaction mode for opening submenus. When true, submenus open on click. When false, submenus open on hover (desktop) and click (touch devices).

Responsivelink

Gets or sets whether the menu should automatically collapse to a hamburger menu on small screens. When enabled, displays a toggle button that expands/collapses the menu on mobile devices.

Declaration
public bool Responsive { get; set; }
Property Value
Type Description
boolGets or sets whether the menu should automatically collapse to a hamburger menu on small screens. When enabled, displays a toggle button that expands/collapses the menu on mobile devices.

ToggleAriaLabellink

Gets or sets the add button aria-label attribute.

Declaration
public string ToggleAriaLabel { get; set; }
Property Value
Type Description
stringGets or sets the add button aria-label attribute.

Methods

AddItemlink

Adds the item.

Declaration
public void AddItem(RadzenMenuItem item)
Parameters
Type Name Description
RadzenMenuItem item The item.

BuildRenderTreelink

Declaration
protected override void BuildRenderTree(Rendering.RenderTreeBuilder __builder)
Parameters
Type Name Description
Rendering.RenderTreeBuilder __builder

Disposelink

Declaration
public override void Dispose()

GetComponentCssClasslink

Declaration
protected override string GetComponentCssClass()
Returns
Type Description
string

OnInitializedlink

Declaration
protected override void OnInitialized()
An error has occurred. This app may no longer respond until reloaded. Reload 🗙