Skip to content
W WRNexusJS
layout component

DesktopNavigation

Reusable desktop navigation component.

@wrnexus/ui 0.2.673 props0 slots0 events

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

PropTypeRequirementDefault
labelstringOptional"Primary navigation"
itemsstringOptional[]
classstringOptional""

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>
    }
}