# Menu System

![A menu system with deep nesting of menus.](/files/-LgHd_8a4AmRJ97om00-)

A menu system features a way for the user to interact with the program, through clicking items, usually presented through dropdowns.

A menu system consists primarily of:

* Menubar
* Menu
* Menu Item

A **menubar** holds **menus** - which are dropdowns, meaning that they expand and collapse on click. Each menu is going to have **menu items**, which appears when the menu is expanded.

## Syntax

A menubar:

```markup
<menu_bar>...</menu_bar>
```

The `...` includes menus.

A menubar with a menu inside:

```markup
<menu_bar>
    <menu>...</menu>
</menu_bar>
```

The `...` includes menu items.

A menubar, holding a menu, which in turn holds 3 menu items:

```markup
<menu_bar>
    <menu>
        <menu_item>...</menu_item>
        <menu_item>...</menu_item>
        <menu_item>...</menu_item>
    </menu>
</menu_bar>
```

The `...` includes text which will be shown, when the item will become visible (when its parent, the menu, will be expanded).

## Nesting

Menus can be nested inside each other by having another menu as its child.

```markup
<menu_bar>
    <menu>
        <menu>
            ...
        </menu>
    </menu>
</menu_bar>
```

Here, we got a menubar, which hosts a menu, which in turn hosts another menu.

The `...` can be menu items, or even more menus. There is no limit to the level of nesting.

## Attributes

Menu Attributes:

* `name` The name of the menu will be displayed in the menubar.


---

# 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://nahiyan.gitbook.io/ondesked/menu_system.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.
