Skip to content

Navbar

Top horizontal navigation bar with brand, nav links, and optional end-slot actions.

Default

A basic navbar with brand text and navigation links.

Tailwind v4
vue
<Navbar brand="Acme Corp">
  <NavbarItem href="#">Home</NavbarItem>
  <NavbarItem href="#" :active="true">Products</NavbarItem>
  <NavbarItem href="#">Pricing</NavbarItem>
  <NavbarItem href="#" :disabled="true">Changelog</NavbarItem>
</Navbar>

With end slot

Use #end to add actions (buttons, avatar, etc.) aligned to the right.

Tailwind v4
vue
<Navbar brand="Acme Corp">
  <NavbarItem href="#">Home</NavbarItem>
  <NavbarItem href="#" :active="true">Docs</NavbarItem>
  <NavbarItem href="#">Blog</NavbarItem>
  <template #end>
    <button>Sign in</button>
  </template>
</Navbar>

Sticky

Pass :sticky="true" to pin the navbar to the top of the viewport on scroll (position: sticky; top: 0; z-index: 100).

Tailwind v4
vue
<Navbar brand="Sticky Nav" :sticky="true">
  <NavbarItem href="#" :active="true">Dashboard</NavbarItem>
  <NavbarItem href="#">Reports</NavbarItem>
</Navbar>

Custom brand slot

Override the brand area entirely with #brand.

Tailwind v4
vue
<Navbar>
  <template #brand>
    <span>◆ Jetpack</span>
  </template>
  <NavbarItem href="#" :active="true">Home</NavbarItem>
  <NavbarItem href="#">About</NavbarItem>
</Navbar>
PropTypeDefaultDescription
brandstringBrand/logo text shown on the left
stickybooleanfalseSticks to the top of the viewport on scroll
transparentbooleanfalseRemoves background and border
SlotDescription
brandOverrides the brand prop; use for logo images or custom markup
defaultNav link items (use NavbarItem)
endRight-aligned actions such as buttons or an avatar
PropTypeDefaultDescription
hrefstringRenders as <a> when provided, otherwise <button>
activebooleanfalseHighlights the item with the primary blue underline
disabledbooleanfalseDims the item and prevents interaction
SlotDescription
defaultLabel content

Private — Jetpack Labs internal use only