<tdclass="cellrowborder"valign="top"width="56.010000000000005%"headers="mcps1.1.5.1.4 "><pid="p18374322121319"><aname="p18374322121319"></a><aname="p18374322121319"></a>Binds the menu to a component. If you click a component bound to the menu, the menu is displayed. The menu can be in text or custom type.</p>
<td class="cellrowborder" valign="top" width="71.43%" headers="mcps1.1.4.1.3 "><p id="p11311360277"><a name="p11311360277"></a><a name="p11311360277"></a>Indicates the action triggered when a menu item is clicked.</p>
</td>
</tr>
</tbody>
</table>
## Example<a name="section3505155091512"></a>
## Attributes
| Name| Type| Default Value | Description|
| -------- | -------- | -------- | -------- |
| bindMenu | Array<MenuItem> \| [CustomBuilder](../../ui/ts-types.md)<sup>8+</sup> | - | Menu bound to the component, which is displayed when you click the component. Textual and custom menu items are supported.|
| bindContextMenu<sup>8+</sup> | content: [CustomBuilder](../../ui/ts-types.md)<br>responseType: ResponseType | - | Context menu bound to the component, which is displayed when you long-press or right-click the component. Only custom menu items are supported.|
- MenuItem
| Name| Type| Description|
| -------- | -------- | -------- |
| value | string | Menu item text.|
| action | () => void | Action triggered when a menu item is clicked.|
- ResponseType<sup>8+</sup>
| Value| Description|
| -------- | -------- |
| LongPress | The menu is displayed when the component is long-pressed. |
| RightClick | The menu is displayed when the component is right-clicked.|