Skip to content

Nav Menu

@astryxdesign/core v0.7.1 · NavMenu

NameTypeDefaultDescription
labelstring-Accessible name of the menu.
size'sm' | 'md' | 'lg''md'Menu width.
focusRequest'first' | 'last' | nullnullMoves focus to the first or last item after open.
NameDescription
closeFired on Escape. NavDisclosure listens and closes the panel.
NameTypeDefaultDescription
labelstring-Item text.
descriptionstring-Supporting line under the text.
hrefstring-Renders a link when set.
asNavLinkComponent'a'Link root.
iconClassstring-CSS icon class.
isDisabledbooleanfalseDisabled. Keyboard navigation skips it.
keepOpenbooleanfalseLeaves the menu open after activation.
isMenuItembooleantrueUses menuitem inside a menu. Set false in a drawer.
NameTypeDefaultDescription
labelstring-Accessible name of the popup.
placement'above' | 'below' | 'start' | 'end''below'Position relative to the trigger.
alignment'start' | 'center' | 'end''start'Cross-axis alignment.
hoverbooleanfalseOpens after a hover delay and closes after the pointer leaves.
showDelaynumber150Hover open delay, in milliseconds.
hideDelaynumber200Pointer-leave close delay, in milliseconds.
NameTypeDefaultDescription
labelstring-Accessible name of the menu.
size'sm' | 'md' | 'lg''md'Menu width, also passed through as item padding.
minWidthnumber | string-Overrides the width that comes from the size. A number is pixels.
focusRequest'first' | 'last' | null-Moves focus to the first or last item after open. A heading menu slot passes this in.
NameDescription
closeFired on Escape.
NameTypeDefaultDescription
labelstring-Primary text. The default slot wins when it is set.
descriptionstring-Supporting line under the text.
hrefstring-Renders a link when set.
asNavLinkComponent'a'Link root.
iconClassstring-CSS icon class.
isDisabledbooleanfalseDisabled. Arrow keys and typeahead skip it.