Navigation Menu
Named navigation disclosures with native destination links.
A semantic navigation landmark with expandable panels and native anchor destination links.
Preview
Section titled “Preview” Web Components React Vue Vue 2
Loading interactive preview… The article and source are ready to read. Interactive controls will appear here when ready.
Installation
Section titled “Installation”Available starting in 0.3.0-rc.1 and later releases.
Compose Root, Trigger, Content, Item, and Link:
- Roles and state:
Rootacts as anavigationlandmark and manages the single open panel viavalue.Triggertoggles a panel, andContentrenders a labelled region. Passvaluefor controlled mode. - Commands and native links:
Itemtriggers a command, whileLinkrenders a real anchor withhref,target,rel, andcurrent(aria-currentfor the current page). URL previews,Enteractivation, modifier/middle-click opening, and navigation are handled natively by the browser. - Navigation events and dismissal: After native activation,
Linkemits a read-onlynavigateevent with{ href, target, rel, modified }. Standard same-window navigation closes the open panel unlesscloseOnSelect={false}; modified clicks, middle clicks, andtarget="_blank"keep the panel open. DisablingLinkremoves its destination and prevents activation. - Host rendering: React, Vue, and Vue 2 render a native anchor root; Web Components wrap your children in an internal anchor that carries focus, styling, and accessibility attributes.
| Prop | Type | Default |
|---|---|---|
defaultValue | string | '' |
disabled | boolean | false |
loop | boolean | true |
a11yLabel | string | '' |
Pass value to control the open panel identifier.
Part Props
Section titled “Part Props”- Trigger:
value(default''),disabled(defaultfalse). - Content:
value(default''),a11yLabel(default''),sideOffset(default4). - Item:
value(default''),textValue(default''),disabled(defaultfalse),closeOnSelect(defaulttrue). - Link:
href(default''),rel(default''),current(defaultfalse),target(default'_self').