MenuItem class

Represents information about menu item for Action Menu and Navigation Bar Menu.

Properties

contentDescription

Additional information for accessibility.

displayMode

The Display Mode of the menu item. Default Behaviour would be DisplayMode.ifRoom if null. See DisplayMode

enabled

State of the menu item

icon

Display icon of the menu item. The icon value must be a string having SVG icon content.

iconSelected

Selected state display icon of the menu item. The icon value must be a string having SVG icon content.

id

Unique identifier for the menu item.

selected

Whether the menu item is selected or not

title

Display title of the menu item.

viewData

Interface to show list of items on selection of menu item.

Property Details

contentDescription

Additional information for accessibility.

contentDescription?: string

Property Value

string

displayMode

The Display Mode of the menu item. Default Behaviour would be DisplayMode.ifRoom if null. See DisplayMode

displayMode?: DisplayMode

Property Value

@microsoft/teams-js.@microsoft.teams-js.menus.DisplayMode

enabled

State of the menu item

enabled: boolean

Property Value

boolean

icon

Display icon of the menu item. The icon value must be a string having SVG icon content.

icon: string

Property Value

string

iconSelected

Selected state display icon of the menu item. The icon value must be a string having SVG icon content.

iconSelected?: string

Property Value

string

id

Unique identifier for the menu item.

id: string

Property Value

string

selected

Whether the menu item is selected or not

selected: boolean

Property Value

boolean

title

Display title of the menu item.

title: string

Property Value

string

viewData

Interface to show list of items on selection of menu item.

viewData: ViewData

Property Value

@microsoft/teams-js.@microsoft.teams-js.menus.ViewData