DesktopNavigation
Reusable desktop navigation component.
Usage
Components are auto-discovered. Use the component directly in any .wrn view:
<DesktopNavigation label="Primary navigation" items="[]" />Legacy mount name: data-component="DesktopNavigation".
Props and attributes
| Prop | Type | Requirement | Default |
|---|---|---|---|
label | string | Optional | "Primary navigation" |
items | string | Optional | [] |
class | string | Optional | "" |
Slots
This component does not declare a slot.
Events
This component does not declare a custom event.
Source contract
Installed source: components/DesktopNavigation.wrn
component DesktopNavigation {
props {
label = "Primary navigation"
items = []
class = ""
}
view { <nav aria-label="{label}" class="wire-desktop-nav {class}"><ul>{#each items as item}<li><a href="{item.href}" aria-current="{item.current ? 'page' : 'false'}">{item.label}</a></li>{/each}</ul></nav> }
}