Components

Navbar

Build a top navigation bar with brand, links, avatar, and a sidebar toggle.

UiNavbar is a composable top navigation bar. Assemble it from brand, nav, link, avatar, and toggle sub-components.

Build a navbar

<script setup lang="ts">
import { NuxtLink } from '#components'
</script>

<template>
  <UiNavbar sticky aria-label="Main navigation">
    <UiNavbarBrand :as="NuxtLink" to="/" text="Acme" logo="/logo.svg" />

    <UiNavbarNav position="start">
      <UiNavbarItem>
        <UiNavbarLink :as="NuxtLink" to="/docs" text="Docs" />
      </UiNavbarItem>
      <UiNavbarItem>
        <UiNavbarLink :as="NuxtLink" to="/pricing" text="Pricing" />
      </UiNavbarItem>
    </UiNavbarNav>

    <UiNavbarNav position="end">
      <UiNavbarAvatar src="/me.jpg" alt="Account" @click="openMenu" />
    </UiNavbarNav>
  </UiNavbar>
</template>

Toggle a sidebar

UiNavbarToggle pairs with UiSidebar's open state:

<template>
  <UiNavbarToggle :collapsed="open" controls="main-sidebar" @toggle="open = !open" />
</template>

UiNavbar props

PropTypeDefaultDescription
stickybooleanfalseSticky positioning.
fluidbooleanfalseFluid (full-width) container.
ariaLabelstring'Main navigation'Landmark name.

Sub-components

ComponentKey props
UiNavbarBrandlogo, initials, text, as, to / href
UiNavbarNavposition ('start' / 'end')
UiNavbarItemcustomClass
UiNavbarLinktext, icon, to / href, as, active
UiNavbarTitletitle
UiNavbarAvatarsrc, alt, size ('sm' / 'navbar'); emits click
UiNavbarTogglecollapsed, controls, collapseText, expandText; emits toggle
UiNavbarCollapse, UiNavbarMobileMenucustomClass
Copyright © 2026