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.
IComponent
IHandleEvent
IHandleAfterRender
RadzenComponentWithChildren.ChildContent
RadzenComponent.SetParametersAsync
RadzenComponent.OnAfterRenderAsync
RadzenComponent.RaiseContextMenu
RadzenComponent.RaiseMouseEnter
RadzenComponent.AddContextMenu
RadzenComponent.RaiseMouseLeave
RadzenComponent.OnBecameInvisible
RadzenComponent.DefaultCulture
RadzenComponent.IsJSRuntimeAvailable
ComponentBase.OnInitializedAsync
ComponentBase.OnParametersSet
ComponentBase.OnParametersSetAsync
ComponentBase.StateHasChanged
ComponentBase.ShouldRender
ComponentBase.OnAfterRender
ComponentBase.InvokeAsync
ComponentBase.DispatchExceptionAsync
ComponentBase.RendererInfo
ComponentBase.Assets
ComponentBase.AssignedRenderMode
Namespace: Radzen.Blazor
Assembly: Radzen.Blazor.dll
public class RadzenMenu : RadzenComponentWithChildren, IComponent, IHandleEvent, IHandleAfterRenderBasic 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>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.
public RadzenMenu()Gets or sets the menu aria label text.
public string AriaLabel { get; set; }
| Type | Description |
|---|---|
| string | Gets or sets the menu aria label text. |
Gets or sets the click callback.
public EventCallback<MenuItemEventArgs> Click { get; set; }
| Type | Description |
|---|---|
| EventCallback<MenuItemEventArgs> | Gets or sets the click callback. |
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).
public bool ClickToOpen { get; set; }
| Type | Description |
|---|---|
| bool | 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). |
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.
public bool Responsive { get; set; }
| Type | Description |
|---|---|
| bool | 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. |
Gets or sets the add button aria-label attribute.
public string ToggleAriaLabel { get; set; }
| Type | Description |
|---|---|
| string | Gets or sets the add button aria-label attribute. |
Adds the item.
public void AddItem(RadzenMenuItem item)
| Type | Name | Description |
|---|---|---|
| RadzenMenuItem | item | The item. |
protected override void BuildRenderTree(Rendering.RenderTreeBuilder __builder)
| Type | Name | Description |
|---|---|---|
| Rendering.RenderTreeBuilder | __builder |
protected override string GetComponentCssClass()
| Type | Description |
|---|---|
| string |