Skip to content

Top Nav Menu

@astryxdesign/core v0.7.1 · TopNavMenu

Props ​

PropTypeDefaultDescription
labelstring—Text on the trigger button. Required.
itemsreadonly TopNavMenuItem[]—Entries of the popover menu. When the entries need custom content, write NavMenuItem elements in the default slot instead.
showDelaynumber150Wait before the menu opens on hover, in milliseconds.
hideDelaynumber200Wait before the menu closes after the pointer leaves, in milliseconds.

TopNavMenuItem fields ​

FieldTypeDefaultDescription
labelstring—Item text. Required.
descriptionstring—Supporting line under the text.
hrefstring—Renders the item as a link when set. Without it, the item is a plain menu entry.
iconClassstring—CSS class of the icon in front of the text.
isDisabledbooleanfalseDisabled entry. Arrow keys and typeahead skip it.
idstring—Stable key for the entry. The label is used when it is empty.

Events ​

  • openChange(isOpen: boolean): fires with true when the menu opens and false when it closes.

Slots ​

  • default: extra entries rendered as menu items, for example NavMenuItem elements.