React navbar components
12 navbar componentsLive previewFull source in your repo
Responsive navigation bars with the mobile menu, the sticky scroll state and the keyboard handling already finished. One command copies the source into your repository.
Works with
- React
- Next.js
- TypeScript
- Tailwind CSS
Responsive navbar examples you can copy
Each navbar is a single file covering the desktop bar, the mobile drawer and the scroll transition. Preview it live, then copy the source into your project.
Navbar With Centered LinksCentered-link navbar with a custom geometric logo mark (replaceable via props), spring-loaded dropdown, and staggered item reveals. Clean, ship-ready, and premium. Adapts to light and dark mode.
Navbar With Floating Pill MenuCentered floating pill navbar with a spring-loaded dropdown, glass backing, and staggered item reveals. Compact, premium, and adapts to light and dark mode.
Navbar With Hover Pill LinksClean sticky navbar with smooth hover pill animations, sign-in link, CTA button, and a mobile drawer. Adapts to light and dark mode automatically.
Navbar With Mega Menu DropdownRefined navbar with a left-aligned floating card dropdown, staggered item reveals, icon circles that invert on hover, and deep shadow depth for a premium product aesthetic. Adapts to light and dark mode.
Navbar With Floating PillDark floating pill that centers at the top of the viewport with backdrop blur, gradient CTA, and hover spring animations. Adapts to light and dark mode automatically.
Navbar With Frosted GlassSticky frosted-glass navigation with adaptive blur on scroll, animated link underlines, and an integrated mobile drawer.
Animated navigation menus, docks and hamburger icons
Navigation with motion built in: an animated hamburger menu for the mobile toggle, a magnetic macOS style dock, a gooey dock, gooey menus, and the accessible Navigation Menu primitive they can sit beside.
Animated Hamburger MenuEight animated hamburger menu icons that morph into a close X or back arrow in CSS.
macOS Floating DockA magnetic dock where icons inflate near the cursor and push their siblings aside.
Gooey DockA dock of icons in a solid pill. The active capsule stretches to the item you pick and flips its icon and label inside.
Gooey Navigation MenuA liquid FAB whose child actions stretch out of the trigger like molten metal.
Gooey Dropdown MenuA capsule trigger drips a menu out of its underside. Arrow keys, live shortcuts, and a clear Delete row come built in.- Navigation MenuNavigation MenuA React navigation menu on Base UI for site headers, with hover dropdowns, mega menu panels, icons, descriptions, nested links, and a compact size.
Navbar building blocks: dropdowns, sidebars, theme toggles and link effects
The accessible pieces underneath: dropdown panels, command search, breadcrumbs, tabs and app sidebars, plus a dark mode toggle for the right side of the bar, animated tabs and link underlines. Use them to extend a navbar or build one from scratch.
- Dropdown MenuDropdown MenuA React dropdown menu on Base UI with grouped sections, submenus, checkbox and radio items, shortcut hints, and destructive actions for rows.
- CommandCommandA React command palette on Base UI with keyword search, grouped actions, nested pages, and shortcut hints, plus a Cmd K dialog to open it anywhere.
- BreadcrumbBreadcrumbA React breadcrumb navigation with aria-current on the last page, long trails that collapse behind a dots menu, icons, and custom separators.
- TabsTabsReact tabs on Base UI with an indicator that slides between tabs, in pill, underline, rounded, segmented, and vertical styles, with arrow key support.
- SidebarSidebarA React app sidebar with collapsible, icon rail, floating, and resizable modes, grouped sections, badge counts, nested links, and a gliding active pill.
- SheetSheetA React sheet that slides in from any edge as a side panel for filters, carts, and mobile navigation, with a persistent mode that ignores backdrop clicks.
- KbdKbdA React kbd component that renders real kbd tags for keyboard shortcuts, with key combinations, key sequences, command rows, and an inline size.
Animated TabsA physical stack of photo cards shuffled to the front by clipped tabs, with a tight image inset and copy in the footer.
Underline AnimationCSS hover underlines for links: slide, center, fill, wavy, and gradient.
Dark Mode ToggleAnimated theme toggle: day and night switch, sun and moon icons and a circle reveal.
Navbar design: sticky, floating or mega menu
A navbar has one job that matters: tell people where they are and where else they can go, without taking room the content needs. The usual navbar design is a logo on the left, four to six links in the middle and one call to action on the right. Most of the difficulty is not visual. It is deciding what earns a top level slot, because past six items people stop reading and start scanning, so the rest belongs in a dropdown or in the footer.
The first real decision is whether the bar sticks. A sticky navbar keeps navigation one click away on a long page, which suits documentation and marketing sites where people jump around. It also costs around sixty pixels of height permanently, which matters more on a phone than on a laptop. Navbar With Frosted Glass and Navbar With Hover Pill Links both stick, and the frosted bar adapts its blur once you scroll so the content underneath stays legible.
Floating navbars detach from the top edge and sit on the page as a rounded pill. Navbar With Floating Pill centres a dark blurred pill with a gradient call to action, and Navbar With Floating Pill Menu adds a spring loaded dropdown on a glass backing. They read lighter than a full width bar but leave the page visible behind them, which works over a solid or gently animated hero and falls apart over a busy photograph. Check the contrast against your real hero before committing.
When the product has more pages than the bar can hold, use a dropdown rather than more links. Navbar With Mega Menu Dropdown opens a floating card under the link with an icon circle beside each item, and Navbar With Centered Links pairs centred links with a single dropdown. Both keep the top bar short while still exposing a dozen destinations in one move.
Mobile is where navbars usually break, so test it before you pick. The mobile menu here opens as a full drawer rather than a cramped dropdown, traps focus while open, closes on Escape and returns focus to the trigger. Those four behaviours separate a working menu from one that strands keyboard and screen reader users, and they are tedious enough that most hand rolled navbars skip at least one. The button that opens it matters too: Animated Hamburger Menu turns its bars into a close X or a back arrow and reports the state with aria-expanded, so the icon always matches what the drawer is doing.
If the site has more than a couple of dozen destinations, add search instead of more links. Command gives you a palette on the standard keyboard shortcut, which regular visitors reach for before they read the bar at all. Pair it with a compact navbar rather than trying to express the whole information architecture across the top of the screen.
Mark the current page. A link that looks the same on every route leaves people guessing where they are, especially after arriving from search. Highlight the active item with weight or a pill rather than colour alone, so the state survives for colour blind visitors and in both light and dark mode.

