A responsive header component that provides primary navigation, branding, and utility controls for Lighthouse applications. Collapses into an offcanvas panel on smaller viewports.

When to Use

  • As the main site header to provide consistent branding and primary navigation across multiple pages
  • To include essential utility links, user authentication controls (login/logout, user profile), or a site-wide search trigger
  • When the application layout requires a persistent top bar that adapts to mobile viewports

When Not to Use

  • For secondary, in-page navigation — use QNav, breadcrumbs, or tabs instead
  • If the header only needs a brand logo with no navigation — a simpler custom header is more appropriate
  • For step-by-step navigation within a wizard — use QStepper instead

Component Anatomy

  • Brand area — displays the application logo and/or title; links to brandTo
  • Navigation links — rendered from navItems; supports nested dropdowns
  • Toggler button — visible on mobile, opens the offcanvas navigation panel
  • Start slot — custom content placed after the brand, before nav links
  • End slot — custom content anchored to the right of the navbar

Default

Only the title prop is required (it can be an empty string). Nav items are rendered when navItems is provided.

Slot "brand-image"

Content placed to the left of the brand title. Empty by default — typically used for a logo image.

Slot "start"

Content rendered after the brand, before the nav links. Replaces the default navigation when provided.

Slot "end"

Content anchored to the far right of the navbar. Empty by default.

Slot "offcanvas"

Content rendered inside the offcanvas panel. Defaults to the vertical nav menu when navItems is provided.

Props

PropTypeDefaultDescription
titlestring""Text displayed as the brand/title in the navbar.
brandTostring | RouteRecordRaw"/"Route for the brand link.
navItemsRouteRecordRaw[][]Navigation items rendered as nav links.
hideNavbooleanfalseHides the navigation links.
hideNavChildrenbooleanfalseHides child navigation items in the horizontal nav.
hideTogglerbooleantrueHides the mobile toggle button.
hideOffcanvasbooleanfalseHides the offcanvas panel.
containerBreakpoint | "fluid""xl"Bootstrap container breakpoint for the navbar content.
stickybooleanfalseMakes the navbar sticky at the top of the viewport.
disabledbooleanfalseDisables the entire navbar.
closeOffcanvasOnNavClickbooleantrueCloses the offcanvas panel when a nav item is clicked.
togglerIconstring"bi-list"Bootstrap Icons class for the toggler button icon.
offcanvasNavClassstring""Additional CSS classes applied to the offcanvas navigation.
classstringnullAdditional CSS classes applied to the navbar root element.

Slots

SlotDescription
brand-imageContent to the left of the brand title (typically a logo). Empty by default.
brand-titleReplaces the default brand title text. Receives title as a slot prop.
startContent after the brand, before nav links. Replaces the default nav when provided.
endContent anchored to the right of the navbar. Empty by default.
offcanvasContent inside the offcanvas panel. Defaults to the vertical nav menu.

Accessibility

  • The navbar uses a semantic <nav> element — if multiple nav landmarks appear on a page, provide distinct aria-label attributes to differentiate them
  • Navigation links must have descriptive text or aria-label attributes
  • The mobile toggler button's aria-expanded and aria-controls states are managed automatically by the component
  • When sticky is enabled, ensure the navbar height is accounted for via scroll-padding-top so keyboard-focused elements are not hidden behind it