Menu

Base menu component for dropdown and popup menus.

Properties

NameTypeDefaultDescription
typeString'menu'The ARIA role type of the menu ('menu' or 'listbox').
openBooleanfalseWhether the menu is open.
quickBooleanfalseWhether to skip open/close animations.
alignPlacement'bottom-start'Menu alignment relative to trigger (e.g., 'top', 'bottom-start').
alignStrategyStrategy'absolute'Positioning strategy ('absolute' or 'fixed').
offsetNumber0Offset from the trigger element in pixels.
keepOpenBlurBooleanfalseWhether to keep menu open when focus is lost.
keepOpenClickItemBooleanfalseWhether to keep menu open when an item is clicked.
keepOpenClickAwayBooleanfalseWhether to keep menu open when clicking outside.
noListControlBooleanfalseWhether to disable list keyboard navigation control.
noFocusControlBooleanfalseWhether to disable automatic focus management.
tabIndexNumber0The tab index of the menu element.

Methods

NameParametersDescription
show()Open the menu.
close()Close the menu.
focusFirstItem()Focus the first item in the menu.
focusLastItem()Focus the last item in the menu.
focusItem(item)itemFocus a specific item in the menu.

Events

NameTypeDescription
openEventFired when the menu is opened.
closeEventFired when the menu is closed.
selectMenuSelectEventFired when a menu item has been selected.
item-focusMenuItemFocusEventFired when a menu item is focused.