MenuButton

A menu button is a button with a chevron icon after the text used to trigger a menu. Menu items can be supplied by both an Items parameter as well as manually as the ChildContent (at the same time).

FluentMenuProvider

With version 4.9.4 of the library, we introduced the FluentMenuProvider component. The MenuButton component has been updated to use this provider. The <FluentMenuProvider /> needs to be placed at the bottom of your HTML page (just like the other ...Providers components). It will renders all menus (and menu items) at the provider location in the HTML structure. This allows for menus to appear on top other components.

Example

Example
Select brand color
Download: 
Besides using the Items parameter, you can also directly enter FluentMenuItems manually. This way you can use all that component's parameters and, for example, disable certain items.
Example
Select brand color
Download: 

Different button appearances

Example
Neutral:
Select an item
Lightweight:
Select an item
Outline:
Select an item
Stealth:
Select an item
With Icon:
Select an item
Download: 

Documentation

FluentMenuButton Class

Parameters

Name
Type
Default
Description
ButtonFluentButton?
Gets or sets a reference to the button.
ButtonAppearanceAppearance
Accent
Gets or sets the button appearance.
ButtonStylestring?
Gets or sets the button style.
ChildContentRenderFragment?
Gets or sets the content to be shown in the menu.
Should consist of FluentMenuItem components.
IconStartIcon?
Gets or sets the Icon displayed at the start of button content.
ItemsDictionary<string, string>
Gets or sets the items to show in the menu.
MenuFluentMenu?
Gets or sets a reference to the menu.
MenuStylestring?
Gets or sets the menu style.
Textstring?
Gets or sets the texts shown on th button.

EventCallbacks

Name
Type
Description
OnMenuChangedEventCallback<MenuChangeEventArgs>
The callback to invoke when a menu item is chosen.
Using this event prevents the execution of any OnClick event on an included FluentMenuItem.
Neutral
Accent
Hypertext
Lightweight
Outline
Stealth
Filled
An error has occurred. This application may no longer respond until reloaded. Reload 🗙