# Horizontal menu

## Overview

A horizontal navigation menu that displays the structure of the application pages. You can configure the menu manually or update it automatically based on the app routes. The component supports multiple levels of sub-items and offers various alignment options.

<figure><img src="/files/GXDYg9yEQ1CxUMMroJaI" alt=""><figcaption></figcaption></figure>

### Properties

| Name   | Type     | Description    |
| ------ | -------- | -------------- |
| `name` | `string` | Component name |

### Methods

<table><thead><tr><th width="101.78515625">Name</th><th width="152.59375">Parameters</th><th width="100.8359375">Returns</th><th>Description</th></tr></thead><tbody><tr><td><code>setItems</code></td><td><code>data: object[]</code></td><td><code>void</code></td><td>Set menu items. Data is an array of items. Each item is an object with the following structure:<br><code>{</code><br><code>title: string;</code><br><code>link: string;</code><br><code>icon?: string;</code><br><code>children?: object[];</code><br><code>}</code></td></tr></tbody></table>

### Triggers

<table><thead><tr><th width="165.38671875">Name</th><th>Description</th></tr></thead><tbody><tr><td><strong>On Init</strong></td><td>Triggered when the component is initialized</td></tr><tr><td><strong>On Item Click</strong></td><td>Triggered when a menu item is clicked</td></tr></tbody></table>


---

# 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.uibakery.io/reference/working-with-components/horizontal-menu.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.
