Icon items
The DropdownMenu component supports icon items using the DropdownMenu.IconItem component. This allows you to create items with icons that can be used to represent actions or statuses.
Properties
IconItem
The IconItem component is a specialized item that displays an icon.
<DropdownMenu.IconItem icon="git-pull-request-closed" // icon name title="Item title" // title of the item description="Description" // [OPTIONAL] description text label="Label" // [OPTIONAL] right-aligned label shortcut="⌘K" // [OPTIONAL] keyboard shortcut checkmark // [OPTIONAL] show checkmark icon className="my-class" // [OPTIONAL] custom class disabled // [OPTIONAL] disable the item onSelect={onSelect} // [OPTIONAL] event handler> {/* Optional nested items for submenu */}</DropdownMenu.IconItem>Prop | Required | Default | Type |
|---|---|---|---|
| icon | true | string | |
| title | true | ReactNode | |
| description | false | string | |
| label | false | string | |
| shortcut | false | string | |
| checkmark | false | false | boolean |
| tag | false | TagProps | |
| className | false | string | |
| disabled | false | false | boolean |
| onSelect | false | (event: Event) => void | |
| children | false | ReactNode |