Content
- Keep each action to a word or two: Edit, History, Delete.
- Name the object only when the action alone is ambiguous.
- Put destructive actions last.
- Name the row in the trigger’s label: Actions for Alarm 1.
A menu hung off one icon button, for the actions on a table or list row.
Open it with a click or the arrow keys, then pick an action.
<WildIconMenu
name="kebab"
aria-label="Actions for Alarm 1"
size="md"
:options="alarmActions"
@select="onAction"
/>An icon button and a dropdown menu. The menu opens 6px below, aligned to the trigger’s right edge.
Three square triggers. The default is md, at 28px.
The trigger is a menu button, so a screen reader hears its label and that it opens a menu. Pass ariaLabel.
| Key | What it does |
|---|---|
| Enter / Space | On the trigger, opens the menu on the first action. On an action, runs it. |
| Down / Up arrow | On the trigger, opens on the first or last action. In the menu, moves between actions. |
| Home / End | Moves to the first or last action. |
| A letter | Moves to the next action starting with it. |
| Escape | Closes the menu and returns focus to the trigger. |
| Tab | Closes the menu and moves on. |
| Prop | Type | Default | Description |
|---|---|---|---|
| name | string | — | Trigger icon name. Use a kebab for row actions. |
| options | { Id, Name, Icon? }[] | [] | The actions, in order. The refined menu adds Destructive and Disabled. |
| ariaLabel | string | 'Menu' | Accessible name for the trigger. |
| size | 'sm' | 'md' | 'lg' | 'md' | Trigger size: 24, 28 or 32px. |
| iconClass | string | 'h-4 w-4 …' | Classes on the trigger icon: 16px, grey. |
| disabled | boolean | false | Blocks the trigger, so the menu never opens. |
| menuClass | string | 'w-44' | Menu width. The default is 176px. |
| portal | boolean | true | Renders the menu on the body, above clipping tables. |
| @select | (option) => void | — | Fires with the picked action. |
| @open-change | (open: boolean) => void | — | Fires when the menu opens or closes. |
| Token | Value | Where it lands |
|---|---|---|
| --global-neutral-grey-900 | #7F7D83 | Trigger icon at rest. |
| --global-neutral-grey-1200 | #1D1C20 | Trigger icon on hover. |
| --global-neutral-grey-300 | #F1F1F1 | Trigger and row hover. |
| --global-neutral-grey-400 | #ECECED | Trigger ground while pressed or open. |
| --global-neutral-grey-800 | #ADACB0 | Disabled trigger icon and row text. |
| --global-blue-1000 | #1877F2 | Trigger icon while open; focus ring. |
| --global-neutral-grey-500 | #E6E6E6 | Menu border. |
| --global-cool-grey-1200 | #24262B | Action text. |
| --global-cool-grey-900 | #595E6A | Row icons. |
| --global-red-900 | #BC1C1C | Destructive action text. |
| --global-red-100 | #FEEBEB | Destructive row hover. |
| --shadow-dropdown | 0 4px 12px | Menu elevation. |