Navigation
Build app navigation with groups and collapsible submenus.
Usage guide
#A persistent navigation menu between the app's main views. Use Menu or Dropdown for temporary command lists.
Always-visible groups
Use nav-group to create menu groups with headings.
Collapsible submenus
Use nav-sub to expand and collapse child items.
Examples
#Feature examples
#Choose a feature from 18 topics. Explore property settings, method calls, event results, and slot layouts through live examples and code.
No matching features.
API reference
#Hover over a name or focus it with the keyboard to see the code. On touch screens, tap the name.
<sy-nav>
Properties
| Attribute / Property | Type | Default | Description |
|---|---|---|---|
boolean | false | Block user interaction and keyboard focus. |
Slots
| Slot | Description |
|---|---|
| Component body or child items. |
<sy-nav-item>
Properties
| Attribute / Property | Type | Default | Description |
|---|---|---|---|
string | '' | Current value or item identifier. | |
boolean | false | Block user interaction and keyboard focus. | |
number | 0 | Menu indentation level, calculated by the parent menu. |
Events
| Event | Detail | Description |
|---|---|---|
CustomEvent<string> | Value of the activated navigation item. The application owns routing. |
Methods
| Method | Returns | Description |
|---|---|---|
Promise<void> | Pass down the parent menu's disabled state. Normally managed by the parent. | |
Promise<void> | Set item styling within a menu group. Managed by the parent. | |
Promise<void> | Change the menu item's selection indicator. |
Slots
| Slot | Description |
|---|---|
| Component body or child items. |
<sy-nav-sub>
Properties
| Attribute / Property | Type | Default | Description |
|---|---|---|---|
string | '' | Title of the collapsible submenu. The HTML attribute is title. | |
string | '' | Current value or item identifier. | |
boolean | false | Whether the submenu is expanded. | |
boolean | false | Block user interaction and keyboard focus. | |
number | 0 | Menu indentation level, calculated by the parent menu. |
Events
| Event | Detail | Description |
|---|---|---|
CustomEvent<string> | Submenu value, emitted when its expanded state changes. |
Methods
| Method | Returns | Description |
|---|---|---|
Promise<void> | Pass down the parent menu's disabled state. Normally managed by the parent. | |
Promise<void> | Set item styling within a menu group. Managed by the parent. | |
Promise<void> | Expand or collapse the submenu. | |
Promise<void> | Expand the submenu. | |
Promise<void> | Close the item. |
Slots
| Slot | Description |
|---|---|
| Component body or child items. |
<sy-nav-group>
Properties
| Attribute / Property | Type | Default | Description |
|---|---|---|---|
string | '' | Menu group title. The HTML attribute is title. | |
number | 0 | Menu indentation level, calculated by the parent menu. |
Slots
| Slot | Description |
|---|---|
| Component body or child items. |