> For the complete documentation index, see [llms.txt](https://docs.avonnicomponents.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.avonnicomponents.com/flow/tutorials/components/navigation/add-sub-menus-and-columns-to-a-navigation-menu.md).

# Add Sub-Menus and Columns to a Navigation Menu

Group navigation items under dropdowns, headings and columns, so a service agent finds open cases or closed deals of an account in two clicks.

A service agent works an account from one screen flow. A flat menu with Open cases, Closed cases, Won deals and Lost deals side by side gets long and hard to scan. Grouping them under Cases and Opportunities keeps the top bar to four words, and each group opens a dropdown with its own entries.

<figure><img src="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2FWgO3x099kmMzpT6GlVGM%2Fadd-sub-menus-and-columns-to-a-navigation-menu-result.png?alt=media" alt="A horizontal navigation menu with the Cases dropdown open, showing Open and Closed with a short description under each"><figcaption><p>Cases is a heading: a click opens Open and Closed.</p></figcaption></figure>

## Before you start

* A screen flow with an Avonni Navigation in horizontal orientation, with the items Overview, Contacts, Opportunities and Cases (values `overview`, `contacts`, `opportunities`, `cases`). [Set up a Navigation](https://docs.avonnicomponents.com/flow/flow-components/navigation.md) shows how.
* This page uses the **Manual** data source. The same settings exist in **Data Mappings** for a **Variable** source.

## Steps

{% stepper %}
{% step %}

### Add sub items under Cases

1. Select the Navigation and click **Open Component Builder**.
2. In **Items**, open the **Cases** item.
3. Under **Sub Items**, click **Add Item** twice:

| Label  | Value          | Description      |
| ------ | -------------- | ---------------- |
| Open   | `cases_open`   | Not closed yet   |
| Closed | `cases_closed` | Solved or closed |

A chevron now appears next to Cases. In a horizontal menu, the **Description** shows under the label of each entry in the dropdown.
{% endstep %}

{% step %}

### Make Cases a heading

Cases now only groups Open and Closed. There is no "all cases" view to select, so a click on Cases should just open the dropdown.

On the **Cases** item, turn on **Unselectable**. A click on Cases opens its menu, and only Open and Closed can be selected. **Active Navigation Item Value** returns `cases_open` or `cases_closed`, never `cases`.
{% endstep %}

{% step %}

### Choose how the dropdown opens

By default, a click on the label of a selectable item selects it, and only the chevron opens its sub items. Pick the behavior that fits:

| Setting                  | Where                              | Effect                                                                                                                    |
| ------------------------ | ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| **Hide Chevron**         | On the item                        | No chevron. A click anywhere on the item opens the dropdown (and selects the item if it is selectable).                   |
| **Open Menu On Hover**   | **Properties**, for the whole menu | The dropdown opens when the mouse moves over the item, and a mouse click no longer opens it. Horizontal orientation only. |
| **Show Dropdown Nubbin** | **Properties**, for the whole menu | Adds a small arrow from the dropdown to its item. Horizontal orientation only.                                            |

On a touch screen there is no hover, so keep **Open Menu On Hover** off for agents on tablets.
{% endstep %}

{% step %}

### Lay out Opportunities in columns

For a bigger group, the **Columns** variant shows each sub item as a column heading with its own entries below it.

1. Open the **Opportunities** item and add two sub items: **Open** (`opportunities_open`) and **Closed** (`opportunities_closed`).
2. In **Open**, add **Sub Sub Items**: **This Quarter** (`opportunities_this_quarter`) and **Later** (`opportunities_later`).
3. In **Closed**, add **Sub Sub Items**: **Won** (`opportunities_won`) and **Lost** (`opportunities_lost`).
4. On **Opportunities**, set **Menu Variant** to **Columns** and turn on **Unselectable**.

The agent selects This Quarter, Later, Won or Lost. Open and Closed are only column names.

<figure><img src="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2FAv0fXkhB0lb77vf5QtGG%2Fadd-sub-menus-and-columns-to-a-navigation-menu-columns.png?alt=media" alt="A navigation dropdown laid out in two columns, Open with This Quarter and Later, Closed with Won and Lost"><figcaption><p>The Columns variant turns sub items into column headings.</p></figcaption></figure>
{% endstep %}

{% step %}

### Or use tabs inside the dropdown

Set **Menu Variant** to **Tabs** instead: Open and Closed become tabs at the top of the dropdown, and each tab lists its own entries. The first tab is open when the dropdown opens.

Both **Columns** and **Tabs** skip a sub item that has no **Sub Sub Items**, so give every column or tab at least one entry.
{% endstep %}

{% step %}

### Save and test

Click **Done**, save the flow and run it with **Debug**.

* Click **Cases**: the dropdown opens with Open and Closed, and Cases stays unselected.
* Click **Closed**: it is highlighted and **Active Navigation Item Value** is `cases_closed`.
* Click **Opportunities**: two columns open, Open and Closed, each with its entries.
  {% endstep %}
  {% endstepper %}

## Use the selected entry

The flow sees one value per entry, whatever its level. A section shown for `cases_open` and another for `cases_closed` works exactly like the one-level menu in [Build tabs on one screen](https://docs.avonnicomponents.com/flow/tutorials/components/navigation/build-tabs-on-one-screen-with-navigation.md). A Decision outcome per value works like [Reuse one menu across a multi-screen flow](https://docs.avonnicomponents.com/flow/tutorials/components/navigation/reuse-one-menu-across-a-multi-screen-flow.md).

To open the screen on Overview, set **Active Navigation Item Value** to `overview`. Pick a selectable entry as the default, not a heading such as `cases`.

## Troubleshooting

<details>

<summary>The Columns or Tabs dropdown is empty</summary>

A sub item with no **Sub Sub Items** is skipped in those variants. Add at least one entry to each column or tab, or switch **Menu Variant** back to **Base**.

</details>

<details>

<summary>Clicking the item selects it instead of opening the dropdown</summary>

The item is selectable and still has its chevron. Turn on **Unselectable**, or turn on **Hide Chevron** so a click both selects it and opens the dropdown.

</details>

<details>

<summary>Menu Variant has no effect</summary>

The Navigation is vertical. In vertical orientation, sub items expand under their item, and **Menu Variant**, **Open Menu On Hover** and **Show Dropdown Nubbin** do not apply.

</details>

## Related tutorials

* [Build a navigation menu from a picklist](https://docs.avonnicomponents.com/flow/tutorials/components/navigation/build-a-navigation-menu-from-a-picklist.md): let a picklist field supply the items.
* [Reuse one menu across a multi-screen flow](https://docs.avonnicomponents.com/flow/tutorials/components/navigation/reuse-one-menu-across-a-multi-screen-flow.md): build this menu once with an action and share it across screens.
* [Build tabs on one screen](https://docs.avonnicomponents.com/flow/tutorials/components/navigation/build-tabs-on-one-screen-with-navigation.md): show a section of the screen per entry.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.avonnicomponents.com/flow/tutorials/components/navigation/add-sub-menus-and-columns-to-a-navigation-menu.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
