# Menu Control

Name

Type

Default Value

Description

bindMenu

Array<MenuItem>

-

Binds the menu to a component. If you click a component bound to the menu, the menu is displayed.

- MenuItem

Name

Type

Description

value

string

Indicates the menu item text.

action

() => void

Indicates the action triggered when a menu item is clicked.

## Example ``` @Entry @Component struct menuExample { build() { Column() { Text('click for Menu') } .width('100%') .margin({ top: 5 }) .bindMenu([ { value: 'Menu1', action: () => { console.info('handle Menu1 select') } }, { value: 'Menu2', action: () => { console.info('handle Menu2 select') } }, ]) } } ``` ![](figures/menu.gif)