Skip to main content
Version: 1.0.3

Mega Menu Multi-Column Dropdown

Mega Menu Multi-Column Dropdown is a flexible navigation pattern for organizing large sets of links.

It supports:

  • Multi-column dropdowns with category headers
  • Links organized by column, each with optional icons or images
  • Nested children for n-level deep menus
  • An optional CTA button in the dropdown panel
  • Hover and keyboard (arrow keys + Escape) interactions
  • Fully responsive layout for desktop and mobile.

Acme Inc.

Mega menu for complex navigation

This example shows the mega menu integrated into a standard page header with supporting content below.

  • Multi-column dropdown with category headers
  • Nested children for deep navigation hierarchies
  • CTA button inside the panel for key actions

Installation

ignix add component mega-menu-multi-column-dropdown

Usage

Import the component:

import { MegaMenuMultiColumnDropdown } from "@ignix-ui/mega-menu-multi-column-dropdown";
import { LayoutDashboard, FileText, Settings, Users, HelpCircle, BookOpen, Code2, Zap, Shield, Globe } from "lucide-react";

Basic Mega Menu

const columns = [
{
header: "Products",
links: [
{ label: "Dashboard", href: "#dashboard", icon: LayoutDashboard },
{ label: "Documents", href: "#documents", icon: FileText },
{ label: "Settings", href: "#settings", icon: Settings },
],
},
{
header: "Resources",
links: [
{ label: "Help Center", href: "#help", icon: HelpCircle },
{ label: "Documentation", href: "#docs", icon: BookOpen },
{ label: "API Reference", href: "#api", icon: Code2 },
],
},
{
header: "Company",
links: [
{ label: "About Us", href: "#about", icon: Users },
{ label: "Careers", href: "#careers", icon: Zap },
{ label: "Security", href: "#security", icon: Shield },
{ label: "Contact", href: "#contact", icon: Globe },
],
},
];

export function BasicMegaMenu() {
return (
<MegaMenuMultiColumnDropdown
triggerLabel="Menu"
theme="light"
align="left"
columns={columns}
cta={{
label: "View all features",
href: "#all-features",
variant: "primary",
}}
/>
);
}

Nested Options (n-level)

const nestedColumns = [
{
header: "Products",
links: [
{
label: "Analytics",
href: "#analytics",
icon: LayoutDashboard,
children: [
{
label: "Dashboards",
href: "#analytics-dashboards",
children: [
{ label: "Team Dashboard", href: "#analytics-dashboards-team" },
{ label: "Executive Overview", href: "#analytics-dashboards-exec" },
],
},
{
label: "Reports",
href: "#analytics-reports",
children: [
{ label: "Weekly Reports", href: "#analytics-reports-weekly" },
{ label: "Custom Reports", href: "#analytics-reports-custom" },
],
},
],
},
],
},
// more columns...
];

export function NestedMegaMenu() {
return (
<MegaMenuMultiColumnDropdown
triggerLabel="Nested"
theme="light"
align="left"
columns={nestedColumns}
/>
);
}

Props

MegaMenuMultiColumnDropdown

PropTypeDefaultDescription
triggerLabelstringLabel for the top-level nav item that opens the mega menu.
columnsMegaMenuColumn[]Columns to display in the dropdown (each has a header and an array of links).
ctaMegaMenuCtaConfigundefinedOptional CTA button rendered at the bottom of the dropdown panel.
onLinkSelect(item: MegaMenuLinkItem, column: MegaMenuColumn) => voidundefinedCallback fired when a link (without children) is selected.
onOpen() => voidundefinedCallback fired when the menu is opened.
onClose() => voidundefinedCallback fired when the menu is closed.
classNamestringundefinedAdditional class names for the root <nav> element.
theme"light" | "dark""light"Controls dropdown background and text colors.
align"left" | "center" | "right""left"Alignment of the dropdown panel relative to the trigger.

MegaMenuColumn

PropTypeDescription
headerstringCategory header text for the column.
linksMegaMenuLinkItem[]Array of links belonging to this column.

MegaMenuLinkItem

PropTypeDescription
labelstringDisplay label for the link.
hrefstringDestination URL or hash.
iconLucideIconOptional Lucide icon component to render before the label.
imageUrlstringOptional image URL; used when icon is not provided.
imageAltstringAlt text for the image.
externalbooleanWhen true, opens the link in a new browser tab.
childrenMegaMenuLinkItem[]Optional nested children for n-level deep menus.

MegaMenuCtaConfig

PropTypeDescription
labelstringCTA button label.
hrefstringOptional destination URL (renders as <a> in button).
onClick() => voidOptional click handler when href is not provided.
variant"default" | "primary" | "secondary" | "outline" | "ghost" | "link"Button visual variant.