Components / Actions
Menu
A keyboard-navigable menu with icons, shortcuts, checkable items, dividers, headings and nested submenus.
@ruckc/truss-ui Actions
Import
import { Menu } from '@ruckc/truss-ui'; Playground
API
| Prop | Type | Default | Description |
|---|---|---|---|
items required | MenuEntry[] | — | The items to render. |
label | string | 'Menu' | Visible label shown above the control. |
autofocus | boolean | false | Focus the first item on mount (set when opened from a trigger). |
onclose event | () => void | — | Called after an item is chosen, so the owner can close the surface. |
onback event | () => void | — | Submenus: called on ArrowLeft to return focus to the parent. |