# Menu item

## Overview

The `MenuItem` is a reusable, design-time entity that integrates into `Menu` structures. It represents an individual menu item used in building menus. Its parent can be either a `Menu` or another `MenuItem`, enabling nested menu structures and flexible menu composition.

It is a reusable, design-time entity that integrates seamlessly into \`Menu\` structures ## Key features

The `MenuItem` includes several important properties that integrate seamlessly within the `Menu` structure. The `enabled` property determines whether the menu item is interactive. The `iconStyleClass` and `styleClass` properties allow the application of specific styling to the item's icon and general appearance, complementing the `Menu`'s overall design. The `name` property uniquely identifies the menu item, while the `permissions` property ensures security and visibility control by restricting access based on user roles. The `text` property displays the menu item content and supports HTML and localized text for dynamic customization. Additionally, the `toolTipText` property provides rich, formatted hover text, enhancing user experience and maintaining consistency with the parent `Menu`.

## Properties Summarized

| Type                                                       | Name                              | Summary                                                                  |
| ---------------------------------------------------------- | --------------------------------- | ------------------------------------------------------------------------ |
| [Boolean](/reference/servoycore/dev-api/js-lib/boolean.md) | [enabled](#enabled)               | Enabled property of the menu item.                                       |
| [String](/reference/servoycore/dev-api/js-lib/string.md)   | [iconStyleClass](#iconstyleclass) |                                                                          |
| [String](/reference/servoycore/dev-api/js-lib/string.md)   | [name](#name)                     | The name/identifier of the menu item.                                    |
| [Object](/reference/servoycore/dev-api/js-lib/object.md)   | [permissions](#permissions)       | The permissions defined for menu item.                                   |
| [String](/reference/servoycore/dev-api/js-lib/string.md)   | [styleClass](#styleclass)         |                                                                          |
| [String](/reference/servoycore/dev-api/js-lib/string.md)   | [text](#text)                     | The text displayed in menu item.                                         |
| [String](/reference/servoycore/dev-api/js-lib/string.md)   | [toolTipText](#tooltiptext)       | The text displayed when hovering over the component with a mouse cursor. |

## Properties Detailed

### enabled

Enabled property of the menu item.

**Type**\
[Boolean](/reference/servoycore/dev-api/js-lib/boolean.md)

### iconStyleClass

**Type**\
[String](/reference/servoycore/dev-api/js-lib/string.md)

### name

The name/identifier of the menu item.

**Type**\
[String](/reference/servoycore/dev-api/js-lib/string.md)

### permissions

The permissions defined for menu item. Similar to form element security. You can configure if a menu item is visible/enabled based on permission.

**Type**\
[Object](/reference/servoycore/dev-api/js-lib/object.md)

### styleClass

**Type**\
[String](/reference/servoycore/dev-api/js-lib/string.md)

### text

The text displayed in menu item. Can contain html, i18n text.

**Type**\
[String](/reference/servoycore/dev-api/js-lib/string.md)

### toolTipText

The text displayed when hovering over the component with a mouse cursor. NOTE: HTML should be used for multi-line tooltips; you can also use any valid HTML tags to format tooltip text. For example: \<html>This includes**bolded text** and \<font color='blue'>BLUE\</font> text as well.\</html>

**Type**\
[String](/reference/servoycore/dev-api/js-lib/string.md)

***


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.servoy.com/reference/servoycore/object-model/solution/menuitem.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
