Components
Components
Menu
Action menu triggered from a button.
newfree
pnpm add @komponents/uiCanonical TypeScript source · tree-shakeable subpathsUse Menu for compact action lists. Separators group destructive choices.
Usage
Accessibility
MenuTriggerwiresaria-haspopupandaria-expandedonto the button and moves focus into the menu when it opens- Arrow keys move between items, Home/End jump to the ends, and typeahead matches by first letters
- Enter or Space fires
onAction; Escape closes the menu and returns focus to the trigger - Items marked
isDisabledare exposed as disabled and cannot be activated MenuSeparatorrendersrole="separator"so groups are announced as distinct