# MenuItemProps (@salmonui/buttons/menu)

> The MenuItemProps interface of @salmonui/buttons/menu.

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

```ts
import type { MenuItemProps } 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 MenuItemProps extends ItemCommonProps {
    readonly id: string;
    readonly item?: MenuItemData | undefined;
    readonly href?: string | undefined;
    readonly target?: string | undefined;
    readonly onAction?: (event: MenuActionEvent) => void;
    readonly render?: (props: MenuItemRenderProps) => ReactElement;
}
```

Members (14):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `id` | `readonly id: string;` |  | Stable item key reported in `onAction` (`data-item-id`; not the DOM id). |
| `item` | `readonly item?: MenuItemData \| undefined;` | optional | The data entry reported in `onAction` (set by the `items` form). |
| `href` | `readonly href?: string \| undefined;` | optional | Renders `<a role="menuitem" href>`. |
| `target` | `readonly target?: string \| undefined;` | optional |  |
| `onAction` | `readonly onAction?: (event: MenuActionEvent) => void;` | optional | This item was chosen; `event.preventDefault()` keeps the menu open. Runs before the menu's `onAction`. |
| `render` | `readonly render?: (props: MenuItemRenderProps) => ReactElement;` | optional | Custom element (router links): `render={(props) => <Link {...props} to="/x" />}`. |
| `children` | `children?: ReactNode;` | optional, inherited |  |
| `icon` | `icon?: ReactNode;` | optional, inherited | Decorative leading icon (`aria-hidden`). |
| `disabled` | `disabled?: boolean;` | optional, inherited | Skipped by arrow keys and typeahead; `aria-disabled="true"`. |
| `textValue` | `textValue?: string;` | optional, inherited | Typeahead text when the children are not plain text. |
| `className` | `className?: string;` | optional, inherited |  |
| `style` | `style?: CSSProperties;` | optional, inherited |  |
| `ref` | `ref?: Ref<HTMLElement>;` | optional, inherited |  |
| `onClick` | `onClick?: ((event: MouseEvent<HTMLElement, MouseEvent>) => void);` | optional, inherited |  |
