Top Nav Menu
@astryxdesign/core v0.7.1 · TopNavMenu
Props
| Prop | Type | Default | Description |
|---|---|---|---|
label | string | — | Text on the trigger button. Required. |
items | readonly TopNavMenuItem[] | — | Entries of the popover menu. When the entries need custom content, write NavMenuItem elements in the default slot instead. |
showDelay | number | 150 | Wait before the menu opens on hover, in milliseconds. |
hideDelay | number | 200 | Wait before the menu closes after the pointer leaves, in milliseconds. |
TopNavMenuItem fields
| Field | Type | Default | Description |
|---|---|---|---|
label | string | — | Item text. Required. |
description | string | — | Supporting line under the text. |
href | string | — | Renders the item as a link when set. Without it, the item is a plain menu entry. |
iconClass | string | — | CSS class of the icon in front of the text. |
isDisabled | boolean | false | Disabled entry. Arrow keys and typeahead skip it. |
id | string | — | Stable key for the entry. The label is used when it is empty. |
Events
openChange(isOpen: boolean): fires withtruewhen the menu opens andfalsewhen it closes.
Slots
default: extra entries rendered as menu items, for exampleNavMenuItemelements.