Skip to main content

MenuItem

ui5-menu-item is the item to use inside a ui5-menu. An arbitrary hierarchy structure can be represented by recursively nesting menu items.

Usage​

ui5-menu-item is an abstract element, representing a node in a ui5-menu. The menu itself is rendered as a list, and each ui5-menu-item is represented by a list item (ui5-li) in that list. Therefore, you should only use ui5-menu-item directly in your apps. The ui5-li list item is internal for the list, and not intended for public use.

ES6 Module Import​

import "@ui5/webcomponents/dist/MenuItem.js";

Properties​

text​

DescriptionDefines the text of the tree item.
Typestring
Default""

additionalText​

DescriptionDefines the additionalText, displayed in the end of the menu item.
Note: The additional text would not be displayed if the item has a submenu.
Typestring
Default""
Since1.8.0

icon​

DescriptionDefines the icon to be displayed as graphical element within the component. The SAP-icons font provides numerous options.
Example:
See all the available icons in the Icon Explorer.
Typestring
Default""

startsSection​

DescriptionDefines whether a visual separator should be rendered before the item.
Typeboolean
Defaultfalse

disabled​

DescriptionDefines whether ui5-menu-item is in disabled state.
Note: A disabled ui5-menu-item is noninteractive.
Typeboolean
Defaultfalse

busy​

DescriptionDefines the delay in milliseconds, after which the busy indicator will be displayed inside the corresponding ui5-menu popover.
Note: If set to true a ui5-busy-indicator component will be displayed into the related one to the current ui5-menu-item sub-menu popover.
Typeboolean
Defaultfalse
Since1.13.0

busyDelay​

DescriptionDefines the delay in milliseconds, after which the busy indicator will be displayed inside the corresponding ui5-menu popover.
Typenumber
Default1000
Since1.13.0

accessibleName​

DescriptionDefines the accessible ARIA name of the component.
Typestring
Default""
Since1.7.0

tooltip​

DescriptionDefines the text of the tooltip for the menu item.
Typestring
Default""
Since1.23.0

Slots​

default​

DescriptionDefines the items of this component.
TypeArray<MenuItem>

Events​

No events available for this component.

Methods​

No methods available for this component.

CSS Parts​

No CSS parts available for this component.