Ballmac UI home

Header 2: mega menu with mobile sheet

Sticky header with brand, a mega menu of grouped links and a featured card, sign-in and primary actions. On phones the same links open in a slide-in sheet with accordions.

Open in v0 (opens in a new tab)

Installation

$ pnpm dlx shadcn@latest add @ballmac/header-2

Usage

Example: header-2-demo.tsx
import { Header2 } from "@/components/ballmac/blocks/header-2/header-2"

/** The page below the header gives the open mega menu something to float over. */
export default function Header2Demo() {
  return (
    <div className="bg-background min-h-[34rem]">
      <Header2 sticky={false} />
      <div className="mx-auto max-w-6xl px-4 pt-20 sm:px-6">
        <div className="bg-muted h-3 w-40 rounded-full" />
        <div className="bg-muted mt-6 h-10 w-full max-w-xl rounded-xl" />
        <div className="bg-muted mt-3 h-10 w-full max-w-md rounded-xl" />
        <div className="mt-8 grid gap-4 sm:grid-cols-3">
          {[0, 1, 2].map((i) => (
            <div key={i} className="bg-muted/60 h-32 rounded-2xl" />
          ))}
        </div>
      </div>
    </div>
  )
}

Dependencies

Use with AI

A navigation header for products with many pages. Pass items (the same shape as mega-menu), brand, logo, secondaryAction and primaryAction. With the shadcn MCP server set up (guide), ask your agent:

Add the Ballmac UI Header 2: mega menu with mobile sheet (@ballmac/header-2) to this project with the shadcn MCP, then use it where it fits.

Use it for

  • Sites with several product areas
  • Anything that outgrew four top-level links

Not for

  • Simple sites with a few links (use header-1)

Registry JSON: https://ui.ballmac.com/r/header-2.json

Free to use in personal and commercial projects.