Nav Menu
@astryxdesign/core v0.7.1 · NavMenu
NavMenu Props
| Name | Type | Default | Description |
|---|---|---|---|
label | string | - | Accessible name of the menu. |
size | 'sm' | 'md' | 'lg' | 'md' | Menu width. |
focusRequest | 'first' | 'last' | null | null | Moves focus to the first or last item after open. |
NavMenu events
| Name | Description |
|---|---|
close | Fired on Escape. NavDisclosure listens and closes the panel. |
NavMenuItem Props
| Name | Type | Default | Description |
|---|---|---|---|
label | string | - | Item text. |
description | string | - | Supporting line under the text. |
href | string | - | Renders a link when set. |
as | NavLinkComponent | 'a' | Link root. |
iconClass | string | - | CSS icon class. |
isDisabled | boolean | false | Disabled. Keyboard navigation skips it. |
keepOpen | boolean | false | Leaves the menu open after activation. |
isMenuItem | boolean | true | Uses menuitem inside a menu. Set false in a drawer. |
NavDisclosure Props
| Name | Type | Default | Description |
|---|---|---|---|
label | string | - | Accessible name of the popup. |
placement | 'above' | 'below' | 'start' | 'end' | 'below' | Position relative to the trigger. |
alignment | 'start' | 'center' | 'end' | 'start' | Cross-axis alignment. |
hover | boolean | false | Opens after a hover delay and closes after the pointer leaves. |
showDelay | number | 150 | Hover open delay, in milliseconds. |
hideDelay | number | 200 | Pointer-leave close delay, in milliseconds. |
NavHeadingMenu Props
| Name | Type | Default | Description |
|---|---|---|---|
label | string | - | Accessible name of the menu. |
size | 'sm' | 'md' | 'lg' | 'md' | Menu width, also passed through as item padding. |
minWidth | number | 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. |
NavHeadingMenu events
| Name | Description |
|---|---|
close | Fired on Escape. |
NavHeadingMenuItem Props
| Name | Type | Default | Description |
|---|---|---|---|
label | string | - | Primary text. The default slot wins when it is set. |
description | string | - | Supporting line under the text. |
href | string | - | Renders a link when set. |
as | NavLinkComponent | 'a' | Link root. |
iconClass | string | - | CSS icon class. |
isDisabled | boolean | false | Disabled. Arrow keys and typeahead skip it. |