page MegaMenucomponent { seo { title = "MegaMenu component" description = "Theme-aware, responsive mega menu component." } view {
W WRNexusJS
navigation component

MegaMenu

Theme-aware, responsive mega menu component.

@wrnexus/ui 0.3.57 props1 slots0 events

Usage

Components are auto-discovered. Use the component directly in any .wrn view:

<MegaMenu
  size="default"
  color="primary"
  label="Mega Menu"
  items="[]"
  active="active"
/>

Legacy mount name: data-component="MegaMenu".

Props and attributes

PropTypeRequirementDefault
sizestringOptional"default"
colorstringOptional"primary"
labelstringOptional"Mega Menu"
itemsstringOptional[]
activestringOptional""
orientationstringOptional"horizontal"
classstringOptional""

Slots

  • default

Events

This component does not declare a custom event.

Source contract

Installed source: components/MegaMenu.wrn

component MegaMenu {
  props {
    size = "default"
    color = "primary"
    label = "Mega Menu"
    items = []
    active = ""
    orientation = "horizontal"
    class = ""
  }
  view {
        <nav class="wire-next wire-next--color-{color} wire-next--size-{size} wire-next--mega-menu wire-next--{orientation} {class}" aria-label="{label}">
      {#each items as item}<a href="{item.href}" aria-current="{item.value === active ? 'page' : ''}">{item.label}</a>{/each}
      <slot />
        </nav>
    }
}
} }