Title: MenuItem
Published: March 9, 2021
Last modified: October 14, 2026

---

# MenuItem

## In this article

 * [Usage](https://developer.wordpress.org/block-editor/reference-guides/components/menu-item/?output_format=md#usage)
 * [Props](https://developer.wordpress.org/block-editor/reference-guides/components/menu-item/?output_format=md#props)
    - [children](https://developer.wordpress.org/block-editor/reference-guides/components/menu-item/?output_format=md#children)
    - [disabled](https://developer.wordpress.org/block-editor/reference-guides/components/menu-item/?output_format=md#disabled)
    - [info](https://developer.wordpress.org/block-editor/reference-guides/components/menu-item/?output_format=md#info)
    - [icon](https://developer.wordpress.org/block-editor/reference-guides/components/menu-item/?output_format=md#icon)
    - [iconPosition](https://developer.wordpress.org/block-editor/reference-guides/components/menu-item/?output_format=md#iconposition)
    - [isSelected](https://developer.wordpress.org/block-editor/reference-guides/components/menu-item/?output_format=md#isselected)
    - [shortcut](https://developer.wordpress.org/block-editor/reference-guides/components/menu-item/?output_format=md#shortcut)
    - [role](https://developer.wordpress.org/block-editor/reference-guides/components/menu-item/?output_format=md#role)
    - [suffix](https://developer.wordpress.org/block-editor/reference-guides/components/menu-item/?output_format=md#suffix)

MenuItem is a component which renders a button intended to be used in combination
with the [DropdownMenu component](https://developer.wordpress.org/block-editor/reference-guide/components/dropdown-menu/).

## 󠀁[Usage](https://developer.wordpress.org/block-editor/reference-guides/components/menu-item/?output_format=md#usage)󠁿

    ```language-jsx
    import { useState } from 'react';
    import { MenuItem } from '@wordpress/components';

    const MyMenuItem = () => {
        const [ isActive, setIsActive ] = useState( true );

        return (
            <MenuItem
                icon={ isActive ? 'yes' : 'no' }
                isSelected={ isActive }
                onClick={ () => setIsActive( ( state ) => ! state ) }
            >
                Toggle
            </MenuItem>
        );
    };
    ```

## 󠀁[Props](https://developer.wordpress.org/block-editor/reference-guides/components/menu-item/?output_format=md#props)󠁿

MenuItem supports the following props. Any additional props are passed through to
the underlying [Button](https://developer.wordpress.org/block-editor/reference-guide/components/button/).

### 󠀁[children](https://developer.wordpress.org/block-editor/reference-guides/components/menu-item/?output_format=md#children)󠁿

 * Type: `Element`
 * Required: No

Element to render as child of button.

### 󠀁[disabled](https://developer.wordpress.org/block-editor/reference-guides/components/menu-item/?output_format=md#disabled)󠁿

 * Type: `boolean`
 * Required: No

Refer to documentation for [Button’s `disabled` prop](https://developer.wordpress.org/block-editor/reference-guide/components/button/#disabled-boolean).

### 󠀁[info](https://developer.wordpress.org/block-editor/reference-guides/components/menu-item/?output_format=md#info)󠁿

 * Type: `string`
 * Required: No

Text to use as description for button text.

### 󠀁[icon](https://developer.wordpress.org/block-editor/reference-guides/components/menu-item/?output_format=md#icon)󠁿

 * Type: `string`
 * Required: No

Refer to documentation for [Button’s `icon` prop](https://developer.wordpress.org/block-editor/reference-guide/components/icon-button/#icon).

### 󠀁[iconPosition](https://developer.wordpress.org/block-editor/reference-guides/components/menu-item/?output_format=md#iconposition)󠁿

 * Type: `string`
 * Required: No
 * Default: `'right'`

Determines where to display the provided `icon`.

### 󠀁[isSelected](https://developer.wordpress.org/block-editor/reference-guides/components/menu-item/?output_format=md#isselected)󠁿

 * Type: `boolean`
 * Required: No

Whether or not the menu item is currently selected. `isSelected` is only taken into
account when the `role` prop is either `"menuitemcheckbox"` or `"menuitemradio"`.

### 󠀁[shortcut](https://developer.wordpress.org/block-editor/reference-guides/components/menu-item/?output_format=md#shortcut)󠁿

 * Type: `string` or `object`
 * Required: No

If shortcut is a string, it is expecting the display text. If shortcut is an object,
it will accept the properties of `display` (string) and `ariaLabel` (string).

### 󠀁[role](https://developer.wordpress.org/block-editor/reference-guides/components/menu-item/?output_format=md#role)󠁿

 * Type: `string`
 * Require: No
 * Default: `'menuitem'`

[Aria Spec](https://www.w3.org/TR/wai-aria-1.1/#aria-checked). If you need to have
selectable menu items use menuitemradio for single select, and menuitemcheckbox 
for multiselect.

### 󠀁[suffix](https://developer.wordpress.org/block-editor/reference-guides/components/menu-item/?output_format=md#suffix)󠁿

 * Type: `Element`
 * Required: No

Allows for markup other than icons or shortcuts to be added to the menu item.

First published

March 9, 2021

Last updated

October 14, 2026

Edit article

[ Improve it on GitHub: MenuItem ](https://github.com/WordPress/gutenberg/edit/trunk/packages/components/src/menu-item/README.md)

[  Previous: MenuGroup](https://developer.wordpress.org/block-editor/reference-guides/components/menu-group/)

[  Next: MenuItemsChoice](https://developer.wordpress.org/block-editor/reference-guides/components/menu-items-choice/)