v2.0.0-rc.4
Theme

Megamenu

Grouped site navigation backed by the native Popover API. The element wraps the public Core CSS contract in Shadow DOM without taking ownership of application state.

Installation

npm install @duskmoon-dev/el-megamenu

Usage

import '@duskmoon-dev/el-megamenu/register';
<el-dm-megamenu trigger-label="Open products menu">
  <span slot="trigger">Products</span>
  <section>
    <h2>Platform</h2>
    <a href="#">Overview</a>
  </section>
  <nav slot="mobile" aria-label="Products"><a href="#">Overview</a></nav>
</el-dm-megamenu>

Live Demo

Megamenu

Products

Platform

Overview

Properties

PropertyTypeDefaultDescription
trigger-labelstring'Open menu'Accessible trigger label
fullbooleanfalseUse the full-width panel variant

Slots

SlotDescription
triggerTrigger label/content
DefaultPanel groups and links
mobileSmall-screen navigation fallback

CSS Parts

Every structural wrapper is exposed with a matching CSS part name for targeted customization.