Top Navigation 4 – Centered pill navigation with dropdown menu
- from @shadcncraft
A centered top navigation where primary links sit inside a pill-style container, creating a strong visual anchor across large screens. Dropdown menus open from the center group to reveal secondary links in a compact panel. On small screens, the layout collapses into a full-height drawer with stacked links and clear primary actions, maintaining the same information structure while prioritizing tap comfort and readability.
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-4Registry 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.
