# MenuItemData (@salmonui/buttons/menu)

> The MenuItemData interface of @salmonui/buttons/menu: Data form of a menu entry (items prop). type defaults to 'item'; an item with items is a submenu; 'group' is a labelled group of items.

Canonical: https://salmonui.dev/docs/reference/buttons/menu/MenuItemData

```ts
import type { MenuItemData } from '@salmonui/buttons/menu';
```

Entry index: https://salmonui.dev/docs/reference/buttons/menu (Markdown with every symbol of the entry: https://salmonui.dev/docs/reference/buttons/menu.md).

## Reference

Kind: interface

```ts
interface MenuItemData {
    readonly type?: 'item' | 'separator' | 'group';
    readonly id?: string;
    readonly label?: ReactNode;
    readonly textValue?: string;
    readonly icon?: ReactNode;
    readonly disabled?: boolean;
    readonly href?: string;
    readonly target?: string;
    readonly title?: string;
    readonly items?: readonly MenuItemData[];
}
```

Data form of a menu entry (`items` prop). `type` defaults to `'item'`; an
item with `items` is a submenu; `'group'` is a labelled group of `items`.

Members (10):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `type` | `readonly type?: 'item' \| 'separator' \| 'group';` | optional |  |
| `id` | `readonly id?: string;` | optional | Stable item key, reported in `onAction` (required for items). |
| `label` | `readonly label?: ReactNode;` | optional |  |
| `textValue` | `readonly textValue?: string;` | optional | Typeahead text when `label` is not plain text. |
| `icon` | `readonly icon?: ReactNode;` | optional |  |
| `disabled` | `readonly disabled?: boolean;` | optional |  |
| `href` | `readonly href?: string;` | optional | Renders the item as a link (`<a role="menuitem">`). |
| `target` | `readonly target?: string;` | optional |  |
| `title` | `readonly title?: string;` | optional |  |
| `items` | `readonly items?: readonly MenuItemData[];` | optional | Submenu entries (type `'item'`) or group entries (type `'group'`). |
