Componentnavigation0.91 KB gzipZero dependencies

Mega Menu

Full-width mega menu with columns, links and featured box.

Preview

Live Preview
Open ↗

Installation

Tokens guide →

Add to your project via CLI (zero dependencies, code you own):

npx bigbullui add mega-menu

Or install the full npm package:

npm install bigbullui

Usage

tsx3 lines
import { MegaMenu } from "@/components/ui/mega-menu"; <MegaMenu />

Source code

mega-menu.tsx + 2 helpers

Zero 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

PropTypeDescription
triggerReact.ReactNodeConfigures trigger.
columnsMegaMenuColumn[]Column definitions describing headers, cell keys, and sorting.
featuredReact.ReactNodeFeatured promotional box in bottom-left