Menu
This documentation provides a comprehensive reference for the Menu component family, including its labels, lists, items, and toggle API.
Preview #
MenuItem Notes #
MenuItemrenders aNavLinkwhenHrefis provided.- When
Hrefis omitted, place your own anchor or nested markup insideMenuItemfor parent branches. IsActiveforces the active style, whileMatchcontrols automatic route matching for linked items.
Menu Parameters #
| Name | Type | Default | Required | Description | Added Version |
|---|---|---|---|---|---|
| AdditionalAttributes | Dictionary<string, object> | null | Gets or sets additional attributes that will be applied to the component. | 1.0.0 | |
| ChildContent | RenderFragment | null | Gets or sets the child content. | 1.2.0 | |
| Class | string? | null | Gets or sets the CSS class name(s) to apply to the component. | 1.0.0 | |
| Id | string? | null | Gets or sets the ID. If not set, a unique ID will be generated. | 1.0.0 | |
| IsScrollable | bool | False | If true, the menu is scrollable. | 1.2.0 | |
| IsVisible | bool | True | If true, the menu is visible. | 1.2.0 | |
| Style | string? | null | Gets or sets the CSS style string that defines the inline styles for the component. | 1.0.0 |
Menu Methods #
| Name | Return type | Description | Added Version |
|---|---|---|---|
| Toggle() | Void | Toggles the menu visibility. | 1.2.0 |
MenuLabel Parameters #
| Name | Type | Default | Required | Description | Added Version |
|---|---|---|---|---|---|
| AdditionalAttributes | Dictionary<string, object> | null | Gets or sets additional attributes that will be applied to the component. | 1.0.0 | |
| ChildContent | RenderFragment | null | Gets or sets the child content. | 1.2.0 | |
| Class | string? | null | Gets or sets the CSS class name(s) to apply to the component. | 1.0.0 | |
| Id | string? | null | Gets or sets the ID. If not set, a unique ID will be generated. | 1.0.0 | |
| Style | string? | null | Gets or sets the CSS style string that defines the inline styles for the component. | 1.0.0 |
MenuList Parameters #
| Name | Type | Default | Required | Description | Added Version |
|---|---|---|---|---|---|
| AdditionalAttributes | Dictionary<string, object> | null | Gets or sets additional attributes that will be applied to the component. | 1.0.0 | |
| ChildContent | RenderFragment | null | Gets or sets the child content. | 1.2.0 | |
| Class | string? | null | Gets or sets the CSS class name(s) to apply to the component. | 1.0.0 | |
| Id | string? | null | Gets or sets the ID. If not set, a unique ID will be generated. | 1.0.0 | |
| Style | string? | null | Gets or sets the CSS style string that defines the inline styles for the component. | 1.0.0 |
MenuItem Parameters #
| Name | Type | Default | Required | Description | Added Version |
|---|---|---|---|---|---|
| AdditionalAttributes | Dictionary<string, object> | null | Gets or sets additional attributes that will be applied to the component. | 1.0.0 | |
| ChildContent | RenderFragment | null | Gets or sets the child content. | 1.2.0 | |
| Class | string? | null | Gets or sets the CSS class name(s) to apply to the component. | 1.0.0 | |
| Href | string | null | Gets or sets the hyperlink reference. If set, the MenuItem renders a NavLink. |
1.2.0 | |
| Id | string? | null | Gets or sets the ID. If not set, a unique ID will be generated. | 1.0.0 | |
| IsActive | bool | False | Gets or sets the active state. This forces the active style on the generated link. | 1.2.0 | |
| Match | MenuItemMatch | Prefix | Gets or sets the criteria used to match menu items. This applies when Href is set. |
1.2.0 | |
| Style | string? | null | Gets or sets the CSS style string that defines the inline styles for the component. | 1.0.0 |