# DataGridMenuItem (@salmonui/data-grid)

> The DataGridMenuItem interface of @salmonui/data-grid.

Canonical: https://salmonui.dev/docs/reference/data-grid/DataGridMenuItem

```ts
import type { DataGridMenuItem } from '@salmonui/data-grid';
```

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

## Reference

Kind: interface

```ts
interface DataGridMenuItem {
    readonly id: string;
    readonly label?: string;
    readonly icon?: ReactNode;
    readonly disabled?: boolean;
    readonly disabledReason?: string;
    readonly checked?: boolean;
    readonly separator?: boolean;
    readonly items?: readonly DataGridMenuItem[];
    readonly render?: () => ReactNode;
    readonly href?: string;
    readonly target?: string;
    readonly targets?: readonly DataGridContextMenuTarget['kind'][];
}
```

Members (12):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `id` | `readonly id: string;` |  | Built-in id or a custom id (reported in click events). |
| `label` | `readonly label?: string;` | optional |  |
| `icon` | `readonly icon?: ReactNode;` | optional | Decorative icon (rendered `aria-hidden`). |
| `disabled` | `readonly disabled?: boolean;` | optional |  |
| `disabledReason` | `readonly disabledReason?: string;` | optional | Shown as the item tooltip when disabled. |
| `checked` | `readonly checked?: boolean;` | optional | Renders `menuitemcheckbox` with `aria-checked`. |
| `separator` | `readonly separator?: boolean;` | optional |  |
| `items` | `readonly items?: readonly DataGridMenuItem[];` | optional | Nested submenu. |
| `render` | `readonly render?: () => ReactNode;` | optional | Custom content of the item (the item keeps its role and keyboard behavior). |
| `href` | `readonly href?: string;` | optional | Renders the item as a link (`<a role="menuitem">`). |
| `target` | `readonly target?: string;` | optional | Link target of an `href` item (`_blank`, ...). |
| `targets` | `readonly targets?: readonly DataGridContextMenuTarget['kind'][];` | optional | Context menu only: the target kinds the item shows on (a selector). Omitted: every target. Built-in ids keep their own area (header, content, pager) and ignore it. |
