Skip to content

Navigation Menu

Combine native links and expandable navigation panels in one bar.

Usage

Product

Combine native product links with disclosure triggers in one navigation surface.

Combine native product links with disclosure triggers in one navigation surface.

Preserve native link navigation alongside compound menu triggers.

Preserve native link navigation alongside compound menu triggers.

Disabled

Remove the control from keyboard and pointer interaction.

API

Vue package: @sectile/vue/navigation-menu

Components
  • NavigationMenuRoot
  • NavigationMenuLink
  • NavigationMenuTrigger
  • NavigationMenuContent
  • NavigationMenuList
  • NavigationMenuItem
  • NavigationMenuViewport
  • NavigationMenuIndicator

Props

as

Element or component rendered for this part.

asChild

Whether to merge this part into its single child instead of rendering a wrapper.

disabled

Whether interaction is unavailable.

value

Current value exposed by this contract.

as

Element or component rendered for this part.

asChild

Whether to merge this part into its single child instead of rendering a wrapper.

defaultHighlightedValue

Initially highlighted value for uncontrolled state.

disabled

Whether interaction is unavailable.

disabledItems

Item values excluded from focus and selection.

items

Ordered item values managed by the component.

label

Accessible name announced for the control.

policies

Behavior policies that customize validation, movement, or selection.

textValue

Returns searchable or presentational text for an item value.

as

Element or component rendered for this part.

asChild

Whether to merge this part into its single child instead of rendering a wrapper.

for

Value or ID of the related part targeted by this component.

Slots

disabled

Whether interaction is unavailable.

highlighted

Whether this item is highlighted for interaction.

open

Whether the associated popup or disclosure is open.

value

Current value exposed by this contract.

disabled

Whether interaction is unavailable.

highlightedValue

Value currently highlighted for interaction.

open

Whether the associated popup or disclosure is open.

openPath

Ordered values in the open menu path.

Events

invoke

Emitted when the current action is invoked.

update:open

Emitted when the component requests a new open state.

Parts

Shared scope: [data-scope="navigation-menu"]. Combine it with a part selector to keep styles local to this component.

PartSelectorRoleExtra attributes
root[data-part="root"]Defines the component boundary and owns its composed parts.
list[data-part="list"]Groups the component items in navigation order.
item-container[data-part="item-container"]Positions one top-level item and its nested content.
item[data-part="item"]Menu item at any hierarchy depth; use data-level to distinguish top-level and nested itemsdata-level="<depth>"
sub-content[data-part="sub-content"]Popup content owned by a parent menu itemdata-level="<depth>"
viewport[data-part="viewport"]Clips and positions the currently visible content.
indicator[data-part="indicator"]Shows state or position without replacing the primary content.

Keyboard interaction

KeyBehavior
Arrow Left / Arrow RightMove between root menu items.
Arrow Down / Arrow UpOpen a branch or move inside its vertical item list.
Home / EndMove to the first or last item at the current level.
Enter / SpaceOpen a branch or invoke the current item.
EscapeClose the branch and return to its owner.

Accessibility

Native links keep link semantics while disclosure triggers expose expanded state for compound panels.

See the corresponding WAI-ARIA pattern for the host accessibility contract.

Released under the MIT License.