Componentnavigation0.91 KB gzipZero dependencies
Mega Menu
Full-width mega menu with columns, links and featured box.
Preview
Live Preview
Installation
Tokens guide →Add to your project via CLI (zero dependencies, code you own):
npx bigbullui add mega-menuOr install the full npm package:
npm install bigbulluiUsage
tsx3 lines
import { MegaMenu } from "@/components/ui/mega-menu"; <MegaMenu />Source code
mega-menu.tsx + 2 helpersZero third-party dependencies (3 local files shown in tabs below).
tsxmega-menu.tsx80 lines
"use client"; import * as React from "react";import { registerEscapeLayer } from "./lib/focus-trap";import { cn } from "./lib/utils"; export interface MegaMenuColumn { title: string; links: { label: string; href?: string; description?: string }[];} export interface MegaMenuProps extends React.HTMLAttributes<HTMLDivElement> { trigger: React.ReactNode; columns: MegaMenuColumn[]; /** Featured promotional box in bottom-left */ featured?: React.ReactNode;} Props
| Prop | Type | Description |
|---|---|---|
| trigger | React.ReactNode | Configures trigger. |
| columns | MegaMenuColumn[] | Column definitions describing headers, cell keys, and sorting. |
| featured | React.ReactNode | Featured promotional box in bottom-left |