Dot Menu
For the … on a row or the account menu under an avatar. It comes out of its button grain by grain, a bar of dots follows the pointer or the arrow keys, and it turns red on something that can't be undone. Letters jump to an item, Escape hands focus back, and you can press, drag and let go to choose in one gesture. It turns upward or slides along to stay on screen.
Needs: None. The popover API, a CSS mask and one small canvas.
Customize
align
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| children | ReactElement | required | The button that opens it. It's given the menu's ARIA and handlers. |
| items | ({ label; onSelect?; href?; shortcut?; danger?; disabled? } | { separator: true } | { heading })[] | required | What's in it. |
| align | "start" | "end" | "start" | Which edge of the trigger it lines up with. |
| label | string | – | What the menu is, for screen readers. |
| tone | string | – | The highlight's colour. The page's accent by default. |
| className | string | – | Class on the menu. |
| style | CSSProperties | – | Style on the menu. |