TelerikMenu<TItem>
A component that lets you render a hierarchical navigation menu with horizontal or vertical orientation. Supports data binding, item templates, item click navigation, item render styling, open/close triggers via ShowOn/HideOn, optional close-on-click, separators/disabled items, and popup settings through MenuSettings.
Definition
Namespace:Telerik.Blazor.Components
Assembly:Telerik.Blazor.dll
Type Parameters:
TItem
Syntax:
public class TelerikMenu<TItem> : HierarchicalBindingComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IDisposable, IMenuPopupContainer, IAsyncDisposable
Inheritance: objectComponentBaseBaseComponentBindingComponentBaseHierarchicalBindingComponentBaseTelerikMenu<TItem>...
Implements:
Inherited Members
Constructors
public TelerikMenu()
Properties
Determines whether the menu popups should close on click.
[Parameter]
public bool CloseOnClick { get; set; }
Data
IEnumerable<TItem>
Defines the Menu's Data.
[Parameter]
public IEnumerable<TItem> Data { get; set; }
Specifies the data-item field that provides optional secondary text below the item label, such as "Description". The description renders independently of ItemTemplate and ItemActionsTemplate. By default, description rendering is disabled.
[Parameter]
public string DescriptionField { get; set; }
Defines the Disabled DataField of the DataSource.
[Parameter]
public string DisabledField { get; set; }
Exposes submenu expansion and collapse as WebMCP tools discoverable by AI models in the browser.
Defaults to false. Configure names and overrides through MenuSettings.
Item activation requires an explicitly enabled SelectItem override and can run application callbacks and URL navigation.
[Parameter]
public bool EnableWebMcpTools { get; set; }
Specifies the Boolean data-item field that marks a child item as a non-interactive group header, such as "GroupHeader".
[Parameter]
public string GroupHeaderField { get; set; }
Defines the content of child items marked by GroupHeaderField.
The template receives the header item and its hierarchical index. If omitted, the configured text field and optional IconField
are used. Keep the template content non-interactive.
[Parameter]
public RenderFragment<GroupHeaderTemplateContext<TItem>> GroupHeaderTemplate { get; set; }
Define the event that triggers closing the popup that contains the menu items.
[Parameter]
public MenuHideEvent HideOn { get; set; }
Defines optional trailing content for an item's link, such as a keyboard shortcut. The template receives the current item and its hierarchical index and renders after the item label and before the submenu arrow. The Menu does not assign keyboard behavior to the content.
[Parameter]
public RenderFragment<ItemActionsTemplateContext<TItem>> ItemActionsTemplate { get; set; }
ItemTemplate
RenderFragment<TItem>
Defines the template for the default icon and label content of each item. Description and Item Actions content render separately.
[Parameter]
public RenderFragment<TItem> ItemTemplate { get; set; }
Specifies the menu settings.
[Parameter]
public RenderFragment MenuSettings { get; set; }
OnClick
EventCallback<TItem>
Defines the OnClick Event which is fired when clicking on a menu item.
[Parameter]
public EventCallback<TItem> OnClick { get; set; }
Fires when a Menu item is being rendered. Can be used to provide custom styling for the Menu's items.
[Parameter]
public Action<MenuItemRenderEventArgs> OnItemRender { get; set; }
Defines the Orientation of Menu - vertical or horizontal.
[Parameter]
public MenuOrientation Orientation { get; set; }
Defines the Separator DataField of the DataSource.
[Parameter]
public string SeparatorField { get; set; }
Define the event that triggers the opening of the menu.
[Parameter]
public MenuShowEvent ShowOn { get; set; }
Methods
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Overrides: