Top Navigation 2 – Centered primary navigation
- from @shadcncraft
A center-aligned top navigation that places the primary links in the middle of the header, creating a more balanced, symmetrical layout. Dropdown menus open directly beneath each item on larger screens, while actions remain grouped to the right. On smaller screens, the navigation collapses into a vertical, full-height menu with expandable sections, keeping the structure clear while shifting focus to touch-friendly interaction.
Install
New to shadcn? Set up your project
If your project already has a shadcn components.json, skip initialization. Otherwise, run this once from your project root.
pnpm dlx shadcn@latest initpnpm dlx shadcn@latest add @shadcncraft/top-navigation-2Registry dependencies6
- button
- navigation-menu
- @shadcncraft/mobile-navigation-menu
- @shadcncraft/placeholder-logo
- @shadcncraft/use-click-outside
- @shadcncraft/use-mobile
Packages0
No npm packages are installed with it.
