Menu
List of actions opened from a button.
Usage
import { Menu } from '@smartui/react';
import '@smartui/react/styles.css';When to use
- Extra actions on a row or a card.
When not to use
- The main action. Show it as a Button.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
trigger | ReactNode | required | |
items | { key, label, icon?, isDanger?, separatorBefore? }[] | required | |
onAction | (key) => void | - | |
placement | Placement | 'bottom end' |
Accessibility
- Arrow keys move, Enter runs, Escape closes and returns focus.