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
Installation
Tokens guide →Add to your project via CLI (zero dependencies, code you own):
npx bigbullui add navigation-menuOr install the full npm package:
npm install bigbulluiUsage
tsx3 lines
import { NavigationMenu } from "@/components/ui/navigation-menu"; <NavigationMenu items={[{ id: "docs", label: "Docs", panel: <Panel /> }]} />Source code
navigation-menu.tsx + 1 helperZero 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
| Prop | Type | Description |
|---|---|---|
| items | NavigationMenuItem[] | Items with optional ReactNode panels. |
| className | string | Optional Tailwind or custom CSS classes merged with component styles. |