Navigation Menu
A row of top-level links for an app header, where an item can open a panel of links.
Installation
bash
shellui-native add navigation-menu
Platforms: MAUI · Avalonia. Also installs icon.
Usage
Basic
An item with links inside shows a chevron and opens a panel of them. An item without links is a plain link that raises Clicked. A link can also have an Icon.
MAUI and Avalonia
- On Avalonia the items are tab stops: Enter, Space or Down opens a panel, and Left / Right move between items.
- In an open Avalonia panel, Up / Down move between the links and Enter picks one.
- On Avalonia the items are collected in
Itemsand an item's links inLinks.
API
NavigationMenu
XAML children go to Items.
No properties of its own.
NavigationMenuItem
XAML children go to Links.
| Property | Type | Default | Description |
|---|---|---|---|
Title |
string |
— | The item's text in the row. |
| Event | Arguments | Description |
|---|---|---|
Clicked |
— | An item without links was pressed. |
| Method | Description |
|---|---|
SetOpen(bool open) |
Opens or closes it. |
Close() |
Closes it. |
Press() |
Opens the panel, or raises Clicked when there are no links, as a click or Enter would. Avalonia only. |
NavigationMenuLink
| Property | Type | Default | Description |
|---|---|---|---|
Title |
string |
— | Link text. |
Description |
string |
— | Supporting text under the title. |
Icon |
IconName |
None |
Lucide icon from IconName; None for no icon. |
| Event | Arguments | Description |
|---|---|---|
Clicked |
— | Clicked or tapped (or Enter / Space with keyboard focus). |
| Method | Description |
|---|---|
Press() |
Picks the link in code, as a click or Enter/Space would. Avalonia only. |