MudBlazor

MudMenu API

Pages

Properties

Name Type Default Description
ActivationEvent
MouseEvent

MouseEvent.LeftClick

Specify the activation event when ActivatorContent is set
ActivatorContent
RenderFragment

null

Place a MudButton, a MudIconButton or any other component capable of acting as an activator. This will override the standard button and all parameters which concern it.
AnchorOrigin
Origin

Origin.TopCenter

Set the anchor origin point to determen where the popover will open from.
ChildContent
RenderFragment

null

Add menu items here
Color
Color

Color.Default

The color of the button. It supports the theme colors.
Dense
Boolean

False

If true, compact vertical padding will be applied to all menu items.
EndIcon
String

null

Icon placed after the text if set.
FullWidth
Boolean

False

If true, the list menu will be same width as the parent.
Icon
String

null

Icon to use if set will turn the button into a MudIconButton.
IconColor
Color

Color.Inherit

The color of the icon. It supports the theme colors.
Label
String

null

ListClass
String

null

User class names for the list, separated by space
LockScroll
Boolean

False

Set to true if you want to prevent page from scrolling when the menu is open
MaxHeight
Nullable<Int32>

null

Sets the maxheight the menu can have when open.
PopoverClass
String

null

User class names for the popover, separated by space
PositionAtCursor
Boolean

False

If true, instead of positioning the menu at the left upper corner, position at the exact cursor location. This makes sense for larger activators
Size
Size

Size.Medium

The button Size of the component.
StartIcon
String

null

Icon placed before the text if set.
TransformOrigin
Origin

Origin.TopCenter

Sets the transform origin point for the popover.
Variant
Variant

Variant.Text

The button variant to use.
Inherited from MudBaseButton
ButtonType
ButtonType

ButtonType.Button

The button Type (Button, Submit, Refresh)
Command
ICommand

null

Command executed when the user clicks on an element.
CommandParameter
Object

null

Command parameter.
Disabled
Boolean

False

If true, the button will be disabled.
DisableElevation
Boolean

False

If true, no drop-shadow will be used.
DisableRipple
Boolean

False

If true, disables ripple effect.
HtmlTag
String

"button"

The HTML element that will be rendered in the root by the component By default, is a button
Link
String

null

If set to a URL, clicking the button will open the referenced document. Use Target to specify where
Target
String

null

The target attribute specifies where to open the link, if Link is specified. Possible values: _blank | _self | _parent | _top | framename
Inherited from MudComponentBase
Class
String

null

User class names, separated by space.
Style
String

null

User styles, applied on top of the component's own classes and styles.
Tag
Object

null

Use Tag to attach any user data object to the component for your convenience.
UserAttributes
Dictionary<String, Object>

UserAttributes carries all attributes you add to the component that don't match any of its parameters. They will be splatted onto the underlying HTML tag.

EventCallbacks

Name Type Description
OnClick
EventCallback<MouseEventArgs>
Button click event.

Methods

Name Parameters Return Description
Activate(object activator, MouseEventArgs args)
object activator
MouseEventArgs args
Implementation of IActivatable.Activate, toggles the menu.
CloseMenu()
ValueTask FocusAsync()
ValueTask
MouseLeave()
OpenMenu(EventArgs args)
EventArgs args
PopoverMouseEnter()
ToggleMenu(MouseEventArgs args)
MouseEventArgs args
An error has occurred. This application may no longer respond until reloaded. Reload 🗙