BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/shadcn/navigation-menu

navigation-menu

shadcn/navigation-menu
FreeComponent

shadcn publishes no description for this item.

Live preview

live · rendered by the registry
Rendered by shadcn on their own page — this is the component running, not a screenshot of it.

Install it

npx shadcn@latest add navigation-menu

Source

ui/navigation-menu.tsxui.shadcn.com/r/styles/new-york/navigation-menu.json
1import * as React from "react"
2import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu"
3import { cva } from "class-variance-authority"
4import { ChevronDown } from "lucide-react"
5
6import { cn } from "@/lib/utils"
7
8const NavigationMenu = React.forwardRef<
9 React.ElementRef<typeof NavigationMenuPrimitive.Root>,
10 React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Root>
11>(({ className, children, ...props }, ref) => (
12 <NavigationMenuPrimitive.Root
13 ref={ref}
14 className={cn(
15 "relative z-10 flex max-w-max flex-1 items-center justify-center",
16 className
17 )}
18 {...props}
19 >
20 {children}
21 <NavigationMenuViewport />
22 </NavigationMenuPrimitive.Root>
23))
24NavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName
25
26const NavigationMenuList = React.forwardRef<
27 React.ElementRef<typeof NavigationMenuPrimitive.List>,
28 React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.List>
29>(({ className, ...props }, ref) => (
30 <NavigationMenuPrimitive.List
31 ref={ref}
32 className={cn(
33 "group flex flex-1 list-none items-center justify-center space-x-1",
34 className
35 )}
36 {...props}
37 />
38))
39NavigationMenuList.displayName = NavigationMenuPrimitive.List.displayName
40
41const NavigationMenuItem = NavigationMenuPrimitive.Item
42
43const navigationMenuTriggerStyle = cva(
44 "group inline-flex h-9 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=open]:text-accent-foreground data-[state=open]:bg-accent/50 data-[state=open]:hover:bg-accent data-[state=open]:focus:bg-accent"
45)
46
47const NavigationMenuTrigger = React.forwardRef<
48 React.ElementRef<typeof NavigationMenuPrimitive.Trigger>,
49 React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Trigger>
50>(({ className, children, ...props }, ref) => (
51 <NavigationMenuPrimitive.Trigger
52 ref={ref}
53 className={cn(navigationMenuTriggerStyle(), "group", className)}
54 {...props}
55 >
56 {children}{" "}
57 <ChevronDown
58 className="relative top-[1px] ml-1 h-3 w-3 transition duration-300 group-data-[state=open]:rotate-180"
59 aria-hidden="true"
60 />
61 </NavigationMenuPrimitive.Trigger>
62))
63NavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger.displayName
64
65const NavigationMenuContent = React.forwardRef<
66// … truncated

Files it writes

  • ui/navigation-menu.tsx

Facts

Registry
shadcn
Type
registry:ui
Access
Free
Files written
1
Licence
the repository states none
In the index
at or before 2026-08-12
Last confirmed
today

Go to the source

Docs on shadcn ui.shadcn.com shadcn-ui/ui on GitHub Raw registry item This item as JSON

More from shadcn

All 63 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
accordionaccordionshadcnComponentsFreeno deps
alertalertshadcnComponentsFreeno deps
alert-dialogalert-dialogshadcnComponentsFreeno deps
aspect-ratioaspect-ratioshadcnComponentsFreeno deps
attachmentattachmentshadcnComponentsFreeno deps
avataravatarshadcnComponentsFreeno deps
badgebadgeshadcnComponentsFreeno deps
breadcrumbbreadcrumbshadcnComponentsFreeno deps

Also from Kynth Studios

Built for the same person as BlockDex

SkillWorks

Claude Code skills and plugins, scored

skillworks.kynth.studio

RuleStack

AGENTS.md gallery and agent-config comparison

rulestack.kynth.studio

ToolDrift

What the AI coding tools changed last night

tooldrift.kynth.studio

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex