Navigation
Navbar
Responsive top navigation.
Usage
A sticky site header with a blurred backdrop. The bottom border fades in once the page scrolls (scroll the preview). The active link gets a pill that glides between links on the morph spring; below 768px of its own width the links move into a menu in a sheet.
Ship updates in one place
Changelogs, release notes and roadmaps that stay in sync with your repo.
Review without the meeting
Comment on any build and approve from your phone in under a minute.
Usage-based pricing, explained
What a typical team of 12 pays, with the maths shown line by line.
How Northwind cut onboarding by 40%
A guided checklist replaced three kick-off calls for every new customer.
Ship updates in one place
Changelogs, release notes and roadmaps that stay in sync with your repo.
Review without the meeting
Comment on any build and approve from your phone in under a minute.
Usage-based pricing, explained
What a typical team of 12 pays, with the maths shown line by line.
How Northwind cut onboarding by 40%
A guided checklist replaced three kick-off calls for every new customer.
When to use
- Marketing sites, documentation and apps with a handful of top-level destinations.
- Anywhere the main navigation should stay reachable while scrolling.
Not for: apps with many sections and nested pages (use a sidebar), or menus with rich panels (put a navigation menu inside the navbar).
Underline indicator
indicator="underline" on NavbarNav makes the links as tall as the navbar and draws a 2px bar on its bottom edge instead of a pill.
Deployments · 14 in the last 7 days, 0 failed.
Floating
variant="floating" is a rounded pill with a shadow that hovers 12px below the top edge.
Mobile menu
The navbar measures its own width, so it collapses inside a narrow container as well as on a phone. The menu is a Sheet; it closes when a link inside it is clicked, when routeKey changes (pass usePathname()) and on back / forward.
Narrower than 768px, the links move into the menu.
API
Navbar
| Prop | Type | Default | Description |
|---|---|---|---|
| variant | 'default' | 'floating' | 'default' | Full-width bar with a bottom border, or a floating pill. |
| sticky | boolean | true | Stick to the top of the scroll container. |
| routeKey | string | — | Changes on navigation; closes the mobile menu. |
| mobileOpen / defaultMobileOpen / onMobileOpenChange | boolean / boolean / (open) => void | — | Control the mobile menu. |
NavbarNav
| Prop | Type | Default | Description |
|---|---|---|---|
| indicator | 'pill' | 'underline' | 'pill' | Style of the gliding highlight. |
NavbarLink / NavbarBrand
| Prop | Type | Default | Description |
|---|---|---|---|
| active | boolean | — | NavbarLink only: the current page (aria-current="page" and the highlight). |
| asChild | boolean | false | Render the child element, e.g. a Next.js Link. |
NavbarActions holds the buttons on the right (add the class ui-navbar-hide-narrow to one that should disappear when collapsed). NavbarMobileToggle is the menu button; NavbarMobileMenu takes title and side.
Keyboard
| Key | Action |
|---|---|
| Tab | Moves through the brand, links and actions. |
| Enter | Follows a link or opens the menu. |
| Esc | Closes the mobile menu and returns focus to its button. |
Accessibility
- A header landmark with a labelled nav (“Main”); the current page has aria-current="page".
- The menu button reports aria-expanded and opens a modal sheet with a title and focus containment.
- The border and blur are decoration only; text contrast is the same scrolled or not.
Motion
- The highlight glides on the morph spring; the first placement never animates.
- The border fades in over 220ms when scrolling starts.
- The mobile sheet slides in on the smooth spring. Reduced motion drops the movement.