Componentnavigation0.87 KB gzipZero dependencies

Navigation Menu

Horizontal nav bar whose items reveal an animated panel below with height/fade reveal and sliding indicator.

Preview

Live Preview
Open ↗

Installation

Tokens guide →

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

npx bigbullui add navigation-menu

Or install the full npm package:

npm install bigbullui

Usage

tsx3 lines
import { NavigationMenu } from "@/components/ui/navigation-menu"; <NavigationMenu items={[{ id: "docs", label: "Docs", panel: <Panel /> }]} />

Source code

navigation-menu.tsx + 1 helper

Zero third-party dependencies (2 local files shown in tabs below).

tsxnavigation-menu.tsx108 lines
"use client"; import * as React from "react";import { cn } from "./lib/utils"; export type NavigationMenuItem = {  id: string;  label: string;  panel?: React.ReactNode;}; export type NavigationMenuProps = {  items: NavigationMenuItem[];  className?: string;}; const NavigationMenu = React.forwardRef<HTMLElement, NavigationMenuProps>(  ({ items = [], className }, forwardedRef) => {

Props

PropTypeDescription
itemsNavigationMenuItem[]Items with optional ReactNode panels.
classNamestringOptional Tailwind or custom CSS classes merged with component styles.