Menu
Description
A menu surface composed of clickable items, optional headers, dividers and arbitrarily deep nested submenus. Built on top of the Popover primitive, so positioning, click-outside dismissal and animation are inherited from the shared popover machinery.
Usage
API reference
public sealed class MenuA menu surface composed of clickable items, optional headers, dividers and arbitrarily deep nested submenus. Built on top of the primitive, so positioning, click-outside dismissal and animation are inherited from the shared popover machinery.
Properties
Methods
public Menu Add(Item item)Adds a single item to this menu. Most code prefers the params overload together with the / factory helpers.
public Menu Placement(TooltipPlacement placement)Sets the preferred placement of this menu relative to its anchor. Defaults to , which mirrors the standard dropdown-menu placement of platforms like Windows and macOS.
public Menu OnHidden(Action onHidden)Registers a callback that fires after this menu has been hidden.
public Menu ShowFor(IComponent anchor)Shows the menu anchored to the rendered element of .
public Menu ShowFor(HTMLElement anchor)Shows the menu anchored to the given DOM element.