// Generated by scripts/generate-showcase.mjs. Do not edit directly. page MegaMenuDetail { layout = "showcase" state playground_color = ctx.url.searchParams.get("pg_color") ?? "primary" state playground_size = ctx.url.searchParams.get("pg_size") ?? "default" state playground_label = ctx.url.searchParams.get("pg_label") ?? "Mega Menu" state playground_icon = ctx.url.searchParams.get("pg_icon") ?? "" state playground_columns = JSON.parse(ctx.url.searchParams.get("pg_columns") ?? "[{\"id\":\"mega-menu-0-1\",\"key\":\"mega-menu-0-1\",\"value\":\"primary\",\"label\":\"Primary workflow\",\"title\":\"Primary workflow\",\"description\":\"A clean default configuration for everyday product interfaces.\",\"text\":\"A configurable sample message.\",\"href\":\"#mega-menu-demo\",\"actionHref\":\"#mega-menu-demo\",\"actionLabel\":\"View details\",\"icon\":\"icon-[lucide--sparkles]\",\"iconClass\":\"icon-[lucide--sparkles]\",\"variant\":\"primary\",\"status\":\"Active\",\"time\":\"09:30\",\"current\":true,\"selected\":true,\"checked\":true,\"disabled\":false,\"outgoing\":false,\"open\":true,\"number\":1,\"count\":16,\"percentage\":72,\"color\":\"#7c3aed\",\"target\":\"_self\",\"ariaLabel\":\"Open primary workflow 1\",\"items\":[{\"label\":\"Nested option A\",\"value\":\"nested-a\"},{\"label\":\"Nested option B\",\"value\":\"nested-b\"}],\"links\":[{\"label\":\"Documentation\",\"href\":\"#documentation\"},{\"label\":\"API reference\",\"href\":\"#api-reference\"}],\"values\":[\"Included\",\"Standard\"]},{\"id\":\"mega-menu-0-2\",\"key\":\"mega-menu-0-2\",\"value\":\"secondary\",\"label\":\"Additional option\",\"title\":\"Supporting example\",\"description\":\"A clean default configuration for everyday product interfaces.\",\"text\":\"Another configurable message.\",\"href\":\"#mega-menu-demo\",\"actionHref\":\"#mega-menu-demo\",\"actionLabel\":\"View details\",\"icon\":\"icon-[lucide--sparkles]\",\"iconClass\":\"icon-[lucide--sparkles]\",\"variant\":\"primary\",\"status\":\"Active\",\"time\":\"09:30\",\"current\":false,\"selected\":false,\"checked\":false,\"disabled\":false,\"outgoing\":true,\"open\":true,\"number\":2,\"count\":32,\"percentage\":72,\"color\":\"#7c3aed\",\"target\":\"_self\",\"ariaLabel\":\"Open primary workflow 2\",\"items\":[{\"label\":\"Nested option A\",\"value\":\"nested-a\"},{\"label\":\"Nested option B\",\"value\":\"nested-b\"}],\"links\":[{\"label\":\"Documentation\",\"href\":\"#documentation\"},{\"label\":\"API reference\",\"href\":\"#api-reference\"}],\"values\":[\"Included\",\"Standard\"]}]") state playground_rail = JSON.parse(ctx.url.searchParams.get("pg_rail") ?? "[{\"id\":\"mega-menu-0-1\",\"key\":\"mega-menu-0-1\",\"value\":\"primary\",\"label\":\"Primary workflow\",\"title\":\"Primary workflow\",\"description\":\"A clean default configuration for everyday product interfaces.\",\"text\":\"A configurable sample message.\",\"href\":\"#mega-menu-demo\",\"actionHref\":\"#mega-menu-demo\",\"actionLabel\":\"View details\",\"icon\":\"icon-[lucide--sparkles]\",\"iconClass\":\"icon-[lucide--sparkles]\",\"variant\":\"primary\",\"status\":\"Active\",\"time\":\"09:30\",\"current\":true,\"selected\":true,\"checked\":true,\"disabled\":false,\"outgoing\":false,\"open\":true,\"number\":1,\"count\":16,\"percentage\":72,\"color\":\"#7c3aed\",\"target\":\"_self\",\"ariaLabel\":\"Open primary workflow 1\",\"items\":[{\"label\":\"Nested option A\",\"value\":\"nested-a\"},{\"label\":\"Nested option B\",\"value\":\"nested-b\"}],\"links\":[{\"label\":\"Documentation\",\"href\":\"#documentation\"},{\"label\":\"API reference\",\"href\":\"#api-reference\"}],\"values\":[\"Included\",\"Standard\"]},{\"id\":\"mega-menu-0-2\",\"key\":\"mega-menu-0-2\",\"value\":\"secondary\",\"label\":\"Additional option\",\"title\":\"Supporting example\",\"description\":\"A clean default configuration for everyday product interfaces.\",\"text\":\"Another configurable message.\",\"href\":\"#mega-menu-demo\",\"actionHref\":\"#mega-menu-demo\",\"actionLabel\":\"View details\",\"icon\":\"icon-[lucide--sparkles]\",\"iconClass\":\"icon-[lucide--sparkles]\",\"variant\":\"primary\",\"status\":\"Active\",\"time\":\"09:30\",\"current\":false,\"selected\":false,\"checked\":false,\"disabled\":false,\"outgoing\":true,\"open\":true,\"number\":2,\"count\":32,\"percentage\":72,\"color\":\"#7c3aed\",\"target\":\"_self\",\"ariaLabel\":\"Open primary workflow 2\",\"items\":[{\"label\":\"Nested option A\",\"value\":\"nested-a\"},{\"label\":\"Nested option B\",\"value\":\"nested-b\"}],\"links\":[{\"label\":\"Documentation\",\"href\":\"#documentation\"},{\"label\":\"API reference\",\"href\":\"#api-reference\"}],\"values\":[\"Included\",\"Standard\"]}]") state playground_featured = JSON.parse(ctx.url.searchParams.get("pg_featured") ?? "{\"id\":\"mega-menu-0-1\",\"key\":\"mega-menu-0-1\",\"value\":\"primary\",\"label\":\"Primary workflow\",\"title\":\"Primary workflow\",\"description\":\"A clean default configuration for everyday product interfaces.\",\"text\":\"A configurable sample message.\",\"href\":\"#mega-menu-demo\",\"actionHref\":\"#mega-menu-demo\",\"actionLabel\":\"View details\",\"icon\":\"icon-[lucide--sparkles]\",\"iconClass\":\"icon-[lucide--sparkles]\",\"variant\":\"primary\",\"status\":\"Active\",\"time\":\"09:30\",\"current\":true,\"selected\":true,\"checked\":true,\"disabled\":false,\"outgoing\":false,\"open\":true,\"number\":1,\"count\":16,\"percentage\":72,\"color\":\"#7c3aed\",\"target\":\"_self\",\"ariaLabel\":\"Open primary workflow 1\",\"items\":[{\"label\":\"Nested option A\",\"value\":\"nested-a\"},{\"label\":\"Nested option B\",\"value\":\"nested-b\"}],\"links\":[{\"label\":\"Documentation\",\"href\":\"#documentation\"},{\"label\":\"API reference\",\"href\":\"#api-reference\"}],\"values\":[\"Included\",\"Standard\"]}") state playground_variant = ctx.url.searchParams.get("pg_variant") ?? "default" state playground_density = ctx.url.searchParams.get("pg_density") ?? "default" state playground_panelWidth = ctx.url.searchParams.get("pg_panelWidth") ?? "xl" state playground_panelAlign = ctx.url.searchParams.get("pg_panelAlign") ?? "start" state playground_columnCount = Number(ctx.url.searchParams.get("pg_columnCount") ?? "3") state playground_fullWidth = (ctx.url.searchParams.get("pg_fullWidth") ?? "false") === "true" state playground_openOnHover = (ctx.url.searchParams.get("pg_openOnHover") ?? "true") === "true" state playground_activeCategory = ctx.url.searchParams.get("pg_activeCategory") ?? "" state playground_actionLabel = ctx.url.searchParams.get("pg_actionLabel") ?? "Mega Menu" state playground_actionHref = ctx.url.searchParams.get("pg_actionHref") ?? "#mega-menu-demo" state playground_actionIcon = ctx.url.searchParams.get("pg_actionIcon") ?? "icon-[lucide--arrow-right]" state playground_footer = ctx.url.searchParams.get("pg_footer") ?? "" state playground_defaultOpen = (ctx.url.searchParams.get("pg_defaultOpen") ?? "false") === "true" state playground_class = ctx.url.searchParams.get("pg_class") ?? "showcase-instance showcase-instance--1" state demo_obj_0 = JSON.parse("{\"id\":\"mega-menu-0-1\",\"key\":\"mega-menu-0-1\",\"value\":\"primary\",\"label\":\"Primary workflow\",\"title\":\"Primary workflow\",\"description\":\"A clean default configuration for everyday product interfaces.\",\"text\":\"A configurable sample message.\",\"href\":\"#mega-menu-demo\",\"actionHref\":\"#mega-menu-demo\",\"actionLabel\":\"View details\",\"icon\":\"icon-[lucide--sparkles]\",\"iconClass\":\"icon-[lucide--sparkles]\",\"variant\":\"primary\",\"status\":\"Active\",\"time\":\"09:30\",\"current\":true,\"selected\":true,\"checked\":true,\"disabled\":false,\"outgoing\":false,\"open\":true,\"number\":1,\"count\":16,\"percentage\":72,\"color\":\"#7c3aed\",\"target\":\"_self\",\"ariaLabel\":\"Open primary workflow 1\",\"items\":[{\"label\":\"Nested option A\",\"value\":\"nested-a\"},{\"label\":\"Nested option B\",\"value\":\"nested-b\"}],\"links\":[{\"label\":\"Documentation\",\"href\":\"#documentation\"},{\"label\":\"API reference\",\"href\":\"#api-reference\"}],\"values\":[\"Included\",\"Standard\"]}") state demo_obj_1 = JSON.parse("{\"id\":\"mega-menu-1-1\",\"key\":\"mega-menu-1-1\",\"value\":\"primary\",\"label\":\"Secondary workflow\",\"title\":\"Secondary workflow\",\"description\":\"A compact configuration designed for dense application layouts.\",\"text\":\"A configurable sample message.\",\"href\":\"#mega-menu-demo\",\"actionHref\":\"#mega-menu-demo\",\"actionLabel\":\"View details\",\"icon\":\"icon-[lucide--zap]\",\"iconClass\":\"icon-[lucide--zap]\",\"variant\":\"secondary\",\"status\":\"Active\",\"time\":\"10:15\",\"current\":true,\"selected\":true,\"checked\":true,\"disabled\":false,\"outgoing\":false,\"open\":true,\"number\":1,\"count\":24,\"percentage\":48,\"color\":\"#0284c7\",\"target\":\"_self\",\"ariaLabel\":\"Open secondary workflow 1\",\"items\":[{\"label\":\"Nested option A\",\"value\":\"nested-a\"},{\"label\":\"Nested option B\",\"value\":\"nested-b\"}],\"links\":[{\"label\":\"Documentation\",\"href\":\"#documentation\"},{\"label\":\"API reference\",\"href\":\"#api-reference\"}],\"values\":[\"Included\",\"Standard\"]}") seo { title = "Mega Menu" description = "Theme-aware, responsive mega menu component." } view {
Navigation component

Mega Menu

Theme-aware, responsive mega menu component.

21 props1 slots4 outputsTheme readyResponsive
Interactive playground

Configure Mega Menu

Change any prop and inspect the server-rendered component immediately.

Live preview
Component code
page MegaMenuExample {
  state columns = [
  {
    "id": "mega-menu-0-1",
    "key": "mega-menu-0-1",
    "value": "primary",
    "label": "Primary workflow",
    "title": "Primary workflow",
    "description": "A clean default configuration for everyday product interfaces.",
    "text": "A configurable sample message.",
    "href": "#mega-menu-demo",
    "actionHref": "#mega-menu-demo",
    "actionLabel": "View details",
    "icon": "icon-[lucide--sparkles]",
    "iconClass": "icon-[lucide--sparkles]",
    "variant": "primary",
    "status": "Active",
    "time": "09:30",
    "current": true,
    "selected": true,
    "checked": true,
    "disabled": false,
    "outgoing": false,
    "open": true,
    "number": 1,
    "count": 16,
    "percentage": 72,
    "color": "#7c3aed",
    "target": "_self",
    "ariaLabel": "Open primary workflow 1",
    "items": [
      {
        "label": "Nested option A",
        "value": "nested-a"
      },
      {
        "label": "Nested option B",
        "value": "nested-b"
      }
    ],
    "links": [
      {
        "label": "Documentation",
        "href": "#documentation"
      },
      {
        "label": "API reference",
        "href": "#api-reference"
      }
    ],
    "values": [
      "Included",
      "Standard"
    ]
  },
  {
    "id": "mega-menu-0-2",
    "key": "mega-menu-0-2",
    "value": "secondary",
    "label": "Additional option",
    "title": "Supporting example",
    "description": "A clean default configuration for everyday product interfaces.",
    "text": "Another configurable message.",
    "href": "#mega-menu-demo",
    "actionHref": "#mega-menu-demo",
    "actionLabel": "View details",
    "icon": "icon-[lucide--sparkles]",
    "iconClass": "icon-[lucide--sparkles]",
    "variant": "primary",
    "status": "Active",
    "time": "09:30",
    "current": false,
    "selected": false,
    "checked": false,
    "disabled": false,
    "outgoing": true,
    "open": true,
    "number": 2,
    "count": 32,
    "percentage": 72,
    "color": "#7c3aed",
    "target": "_self",
    "ariaLabel": "Open primary workflow 2",
    "items": [
      {
        "label": "Nested option A",
        "value": "nested-a"
      },
      {
        "label": "Nested option B",
        "value": "nested-b"
      }
    ],
    "links": [
      {
        "label": "Documentation",
        "href": "#documentation"
      },
      {
        "label": "API reference",
        "href": "#api-reference"
      }
    ],
    "values": [
      "Included",
      "Standard"
    ]
  }
]
  state rail = [
  {
    "id": "mega-menu-0-1",
    "key": "mega-menu-0-1",
    "value": "primary",
    "label": "Primary workflow",
    "title": "Primary workflow",
    "description": "A clean default configuration for everyday product interfaces.",
    "text": "A configurable sample message.",
    "href": "#mega-menu-demo",
    "actionHref": "#mega-menu-demo",
    "actionLabel": "View details",
    "icon": "icon-[lucide--sparkles]",
    "iconClass": "icon-[lucide--sparkles]",
    "variant": "primary",
    "status": "Active",
    "time": "09:30",
    "current": true,
    "selected": true,
    "checked": true,
    "disabled": false,
    "outgoing": false,
    "open": true,
    "number": 1,
    "count": 16,
    "percentage": 72,
    "color": "#7c3aed",
    "target": "_self",
    "ariaLabel": "Open primary workflow 1",
    "items": [
      {
        "label": "Nested option A",
        "value": "nested-a"
      },
      {
        "label": "Nested option B",
        "value": "nested-b"
      }
    ],
    "links": [
      {
        "label": "Documentation",
        "href": "#documentation"
      },
      {
        "label": "API reference",
        "href": "#api-reference"
      }
    ],
    "values": [
      "Included",
      "Standard"
    ]
  },
  {
    "id": "mega-menu-0-2",
    "key": "mega-menu-0-2",
    "value": "secondary",
    "label": "Additional option",
    "title": "Supporting example",
    "description": "A clean default configuration for everyday product interfaces.",
    "text": "Another configurable message.",
    "href": "#mega-menu-demo",
    "actionHref": "#mega-menu-demo",
    "actionLabel": "View details",
    "icon": "icon-[lucide--sparkles]",
    "iconClass": "icon-[lucide--sparkles]",
    "variant": "primary",
    "status": "Active",
    "time": "09:30",
    "current": false,
    "selected": false,
    "checked": false,
    "disabled": false,
    "outgoing": true,
    "open": true,
    "number": 2,
    "count": 32,
    "percentage": 72,
    "color": "#7c3aed",
    "target": "_self",
    "ariaLabel": "Open primary workflow 2",
    "items": [
      {
        "label": "Nested option A",
        "value": "nested-a"
      },
      {
        "label": "Nested option B",
        "value": "nested-b"
      }
    ],
    "links": [
      {
        "label": "Documentation",
        "href": "#documentation"
      },
      {
        "label": "API reference",
        "href": "#api-reference"
      }
    ],
    "values": [
      "Included",
      "Standard"
    ]
  }
]
  view {
    <MegaMenu
      label="Mega Menu"
      columns="{columns}"
      rail="{rail}"
      featured='{
        "id": "mega-menu-0-1",
        "key": "mega-menu-0-1",
        "value": "primary",
        "label": "Primary workflow",
        "title": "Primary workflow",
        "description": "A clean default configuration for everyday product interfaces.",
        "text": "A configurable sample message.",
        "href": "#mega-menu-demo",
        "actionHref": "#mega-menu-demo",
        "actionLabel": "View details",
        "icon": "icon-[lucide--sparkles]",
        "iconClass": "icon-[lucide--sparkles]",
        "variant": "primary",
        "status": "Active",
        "time": "09:30",
        "current": true,
        "selected": true,
        "checked": true,
        "disabled": false,
        "outgoing": false,
        "open": true,
        "number": 1,
        "count": 16,
        "percentage": 72,
        "color": "#7c3aed",
        "target": "_self",
        "ariaLabel": "Open primary workflow 1",
        "items": [
          {
            "label": "Nested option A",
            "value": "nested-a"
          },
          {
            "label": "Nested option B",
            "value": "nested-b"
          }
        ],
        "links": [
          {
            "label": "Documentation",
            "href": "#documentation"
          },
          {
            "label": "API reference",
            "href": "#api-reference"
          }
        ],
        "values": [
          "Included",
          "Standard"
        ]
      }'
      columnCount="3"
      actionLabel="Mega Menu"
      actionHref="#mega-menu-demo"
    />
  }
}
Event outputInteract with the preview to inspect the typed payload.
Component props21 controls
Live examples

Designed for real product surfaces

Compare configurations and resize the browser to check responsive behavior.

Recommended

Grouped columns

One level deep by design: a mega menu shows breadth flat so everything is one click away. Nesting inside the panel would bury content behind hover-within-hover. Use Nav when you want cascading submenus.

01
Live preview
Component usage.wrn
page MegaMenuExample {
  state columns = [
  {
    "heading": "Platform",
    "items": [
      {
        "label": "Runtime",
        "href": "/runtime",
        "description": "The browser half of the framework."
      },
      {
        "label": "Compiler",
        "href": "/compiler",
        "description": "WRN to JavaScript."
      }
    ]
  },
  {
    "heading": "Tooling",
    "items": [
      {
        "label": "CLI",
        "href": "/cli",
        "description": "Scaffold, build and deploy."
      },
      {
        "label": "Editor",
        "href": "/editor",
        "description": "Language server and syntax."
      }
    ]
  }
]
  state rail = [
  {
    "id": "mega-menu-0-1",
    "key": "mega-menu-0-1",
    "value": "primary",
    "label": "Primary workflow",
    "title": "Primary workflow",
    "description": "A clean default configuration for everyday product interfaces.",
    "text": "A configurable sample message.",
    "href": "#mega-menu-demo",
    "actionHref": "#mega-menu-demo",
    "actionLabel": "View details",
    "icon": "icon-[lucide--sparkles]",
    "iconClass": "icon-[lucide--sparkles]",
    "variant": "primary",
    "status": "Active",
    "time": "09:30",
    "current": true,
    "selected": true,
    "checked": true,
    "disabled": false,
    "outgoing": false,
    "open": true,
    "number": 1,
    "count": 16,
    "percentage": 72,
    "color": "#7c3aed",
    "target": "_self",
    "ariaLabel": "Open primary workflow 1",
    "items": [
      {
        "label": "Nested option A",
        "value": "nested-a"
      },
      {
        "label": "Nested option B",
        "value": "nested-b"
      }
    ],
    "links": [
      {
        "label": "Documentation",
        "href": "#documentation"
      },
      {
        "label": "API reference",
        "href": "#api-reference"
      }
    ],
    "values": [
      "Included",
      "Standard"
    ]
  },
  {
    "id": "mega-menu-0-2",
    "key": "mega-menu-0-2",
    "value": "secondary",
    "label": "Additional option",
    "title": "Supporting example",
    "description": "A clean default configuration for everyday product interfaces.",
    "text": "Another configurable message.",
    "href": "#mega-menu-demo",
    "actionHref": "#mega-menu-demo",
    "actionLabel": "View details",
    "icon": "icon-[lucide--sparkles]",
    "iconClass": "icon-[lucide--sparkles]",
    "variant": "primary",
    "status": "Active",
    "time": "09:30",
    "current": false,
    "selected": false,
    "checked": false,
    "disabled": false,
    "outgoing": true,
    "open": true,
    "number": 2,
    "count": 32,
    "percentage": 72,
    "color": "#7c3aed",
    "target": "_self",
    "ariaLabel": "Open primary workflow 2",
    "items": [
      {
        "label": "Nested option A",
        "value": "nested-a"
      },
      {
        "label": "Nested option B",
        "value": "nested-b"
      }
    ],
    "links": [
      {
        "label": "Documentation",
        "href": "#documentation"
      },
      {
        "label": "API reference",
        "href": "#api-reference"
      }
    ],
    "values": [
      "Included",
      "Standard"
    ]
  }
]
  view {
    <MegaMenu
      label="Products"
      icon="icon-[lucide--box]"
      columns="{columns}"
      rail="{rail}"
      featured='{
        "id": "mega-menu-0-1",
        "key": "mega-menu-0-1",
        "value": "primary",
        "label": "Primary workflow",
        "title": "Primary workflow",
        "description": "A clean default configuration for everyday product interfaces.",
        "text": "A configurable sample message.",
        "href": "#mega-menu-demo",
        "actionHref": "#mega-menu-demo",
        "actionLabel": "View details",
        "icon": "icon-[lucide--sparkles]",
        "iconClass": "icon-[lucide--sparkles]",
        "variant": "primary",
        "status": "Active",
        "time": "09:30",
        "current": true,
        "selected": true,
        "checked": true,
        "disabled": false,
        "outgoing": false,
        "open": true,
        "number": 1,
        "count": 16,
        "percentage": 72,
        "color": "#7c3aed",
        "target": "_self",
        "ariaLabel": "Open primary workflow 1",
        "items": [
          {
            "label": "Nested option A",
            "value": "nested-a"
          },
          {
            "label": "Nested option B",
            "value": "nested-b"
          }
        ],
        "links": [
          {
            "label": "Documentation",
            "href": "#documentation"
          },
          {
            "label": "API reference",
            "href": "#api-reference"
          }
        ],
        "values": [
          "Included",
          "Standard"
        ]
      }'
      columnCount="3"
      actionLabel="Mega Menu"
      actionHref="#mega-menu-demo"
    />
  }
}
Advanced

With a footer note

The panel is anchored, so the runtime clamp pulls it back inside the viewport instead of letting it hang off a wide layout. On a phone it stops floating and joins the flow.

02
Live preview
Component usage.wrn
page MegaMenuExample {
  state columns = [
  {
    "heading": "By team",
    "items": [
      {
        "label": "Engineering",
        "href": "/eng",
        "icon": "icon-[lucide--code]"
      },
      {
        "label": "Design",
        "href": "/design",
        "icon": "icon-[lucide--palette]"
      },
      {
        "label": "Support",
        "href": "/support",
        "icon": "icon-[lucide--life-buoy]"
      }
    ]
  },
  {
    "heading": "By size",
    "items": [
      {
        "label": "Startup",
        "href": "/startup"
      },
      {
        "label": "Enterprise",
        "href": "/enterprise"
      }
    ]
  }
]
  state rail = [
  {
    "id": "mega-menu-1-1",
    "key": "mega-menu-1-1",
    "value": "primary",
    "label": "Secondary workflow",
    "title": "Secondary workflow",
    "description": "A compact configuration designed for dense application layouts.",
    "text": "A configurable sample message.",
    "href": "#mega-menu-demo",
    "actionHref": "#mega-menu-demo",
    "actionLabel": "View details",
    "icon": "icon-[lucide--zap]",
    "iconClass": "icon-[lucide--zap]",
    "variant": "secondary",
    "status": "Active",
    "time": "10:15",
    "current": true,
    "selected": true,
    "checked": true,
    "disabled": false,
    "outgoing": false,
    "open": true,
    "number": 1,
    "count": 24,
    "percentage": 48,
    "color": "#0284c7",
    "target": "_self",
    "ariaLabel": "Open secondary workflow 1",
    "items": [
      {
        "label": "Nested option A",
        "value": "nested-a"
      },
      {
        "label": "Nested option B",
        "value": "nested-b"
      }
    ],
    "links": [
      {
        "label": "Documentation",
        "href": "#documentation"
      },
      {
        "label": "API reference",
        "href": "#api-reference"
      }
    ],
    "values": [
      "Included",
      "Standard"
    ]
  },
  {
    "id": "mega-menu-1-2",
    "key": "mega-menu-1-2",
    "value": "secondary",
    "label": "Additional option",
    "title": "Supporting example",
    "description": "A compact configuration designed for dense application layouts.",
    "text": "Another configurable message.",
    "href": "#mega-menu-demo",
    "actionHref": "#mega-menu-demo",
    "actionLabel": "View details",
    "icon": "icon-[lucide--zap]",
    "iconClass": "icon-[lucide--zap]",
    "variant": "secondary",
    "status": "Active",
    "time": "10:15",
    "current": false,
    "selected": false,
    "checked": false,
    "disabled": false,
    "outgoing": true,
    "open": true,
    "number": 2,
    "count": 48,
    "percentage": 48,
    "color": "#0284c7",
    "target": "_self",
    "ariaLabel": "Open secondary workflow 2",
    "items": [
      {
        "label": "Nested option A",
        "value": "nested-a"
      },
      {
        "label": "Nested option B",
        "value": "nested-b"
      }
    ],
    "links": [
      {
        "label": "Documentation",
        "href": "#documentation"
      },
      {
        "label": "API reference",
        "href": "#api-reference"
      }
    ],
    "values": [
      "Included",
      "Standard"
    ]
  }
]
  view {
    <MegaMenu
      size="sm"
      label="Solutions"
      icon="icon-[lucide--arrow-right]"
      columns="{columns}"
      rail="{rail}"
      featured='{
        "id": "mega-menu-1-1",
        "key": "mega-menu-1-1",
        "value": "primary",
        "label": "Secondary workflow",
        "title": "Secondary workflow",
        "description": "A compact configuration designed for dense application layouts.",
        "text": "A configurable sample message.",
        "href": "#mega-menu-demo",
        "actionHref": "#mega-menu-demo",
        "actionLabel": "View details",
        "icon": "icon-[lucide--zap]",
        "iconClass": "icon-[lucide--zap]",
        "variant": "secondary",
        "status": "Active",
        "time": "10:15",
        "current": true,
        "selected": true,
        "checked": true,
        "disabled": false,
        "outgoing": false,
        "open": true,
        "number": 1,
        "count": 24,
        "percentage": 48,
        "color": "#0284c7",
        "target": "_self",
        "ariaLabel": "Open secondary workflow 1",
        "items": [
          {
            "label": "Nested option A",
            "value": "nested-a"
          },
          {
            "label": "Nested option B",
            "value": "nested-b"
          }
        ],
        "links": [
          {
            "label": "Documentation",
            "href": "#documentation"
          },
          {
            "label": "API reference",
            "href": "#api-reference"
          }
        ],
        "values": [
          "Included",
          "Standard"
        ]
      }'
      variant="secondary"
      columnCount="7"
      actionLabel="Compact example"
      actionHref="#mega-menu-demo"
      footer="Not sure where to start? Talk to us."
    />
  }
}
Component outputs

Receive every typed component output

Use declarative output handlers in .wrn files or register a direct output handler from JavaScript. The canonical API exposes payload and does not require event.detail.

@openFires after the component opens.
@closeFires after the component closes.
@selectFires when an item, option, card, or result is selected.
@categoryFires when the component emits the category event.
Declarative handlers.wrn
<MegaMenu
  @open='console.log(payload)'
  @close='console.log(payload)'
  @select='console.log(payload)'
  @category='console.log(payload)'
/>
Direct output handlers.js
import { registerOutputHandler } from "@wrnexus/csr/outputs"

const component = document.querySelector("[data-ui-component=\"MegaMenu\"], [data-component=\"MegaMenu\"]")

if (component) registerOutputHandler(component, "open", (payload) => {
  console.log("open", payload)
})

if (component) registerOutputHandler(component, "close", (payload) => {
  console.log("close", payload)
})

if (component) registerOutputHandler(component, "select", (payload) => {
  console.log("select", payload)
})

if (component) registerOutputHandler(component, "category", (payload) => {
  console.log("category", payload)
})
Component API

Props and configuration

All content and behavior shown above is supplied through these props and slots.

PropTypeDefaultRequired
colorstring"primary"No
sizestring"default"No
labelstring"Menu"No
iconstring""No
columnsunknown[][]No
railunknown[][]No
featuredRecord<string, unknown>{}No
variantstring"default"No
densitystring"default"No
panelWidthstring"xl"No
panelAlignstring"start"No
columnCountnumber0No
fullWidthbooleanfalseNo
openOnHoverbooleantrueNo
activeCategorystring""No
actionLabelstring""No
actionHrefstring""No
actionIconstring"icon-[lucide--arrow-right]"No
footerstring""No
defaultOpenbooleanfalseNo
classstring""No
} }