# Menubar > A row of menus, like a desktop app's File, Edit and View. Source: https://native.shellui.dev/docs/components/navigation/menubar ## Installation ```bash shellui-native add menubar ``` **Platforms:** MAUI · Avalonia. Also installs `icon`. ## Usage ### Basic **MAUI** ```xml ``` **Avalonia** ```xml ``` [Live preview](https://native.shellui.dev/preview/index.html?c=menubar-basic) Each menu opens a panel of items under its title. Clicking outside, picking an item or pressing Escape closes it, and opening one menu closes the other. `Shortcut` is a hint at the end of the row; it doesn't register a key. ## MAUI and Avalonia - On Avalonia the titles are tab stops: Enter, Space or Down opens a menu, and Left / Right move between titles. - In an open Avalonia menu, Up / Down move between the items and Enter picks one. - On Avalonia the menus are collected in `Menus` and a menu's items in `Items`. ## API ### Menubar XAML children go to `Menus`. No properties of its own. ### MenubarMenu XAML children go to `Items`. | Property | Type | Default | Description | |---|---|---|---| | `Title` | `string` | — | The menu's name in the bar. | | Event | Arguments | Description | |---|---|---| | `Opened` | — | The menu opened. | | `Closed` | — | The menu closed. | | Method | Description | |---|---| | `SetOpen(bool open)` | Opens or closes it. | | `Close()` | Closes it. | ### MenubarItem | Property | Type | Default | Description | |---|---|---|---| | `Text` | `string` | — | Item text. | | `Icon` | `IconName` | `None` | Lucide icon from `IconName`; `None` for no icon. | | `Shortcut` | `string` | — | Keyboard hint shown at the end of the row (display only). | | `IsDestructive` | `bool` | `false` | Draws the item in the destructive colour. | | Event | Arguments | Description | |---|---|---| | `Clicked` | — | Clicked or tapped (or Enter / Space with keyboard focus). | | Method | Description | |---|---| | `Press()` | Picks the item in code, as a click or Enter/Space would. Avalonia only. | ### MenubarSeparator No properties of its own.