Skip to main content
vd3
  • Home
  • Docs
  • Foundation
  • Color palette
  • Typography
  • Icons
  • Golden ratio
  • Grid system
  • Shadows & glow
  • Theme
  • Theme switcher
  • Theme customizer
  • Core
  • Button
  • Badge
  • Alert
  • Card
  • Dropdown
  • Menu
  • Popover
  • Doc Search
  • Floating Action Button
  • Ripple
  • Expanding Cards
  • Spotlight
  • Timeline
  • Template
  • Navigation
  • Feedback
  • Modal
  • Toast
  • Tooltip
  • Chip
  • Skeleton
  • Preloader
  • Data display
  • Avatar
  • Table
  • Collection
  • Breadcrumb
  • Interactive
  • Tabs
  • Accordion
  • Flow
  • Draggable
  • Search
  • Canvas
  • Charts
  • Flowchart
  • Hex Grid
  • Draw
  • Media
  • Music Player
  • Image Box
  • Editors
  • Code Editor
  • Effects
  • Glass
  • Morph
  • Parallax
  • Forms
  • Form controls
  • Form validation
  • Datepicker
  • Timepicker
  • Rating
  • Switch
  • Slider
  • Stepper
  • Autocomplete
  • Transfer
  • Tree
  • Pagination
  • Button group
  • Primitives
  • Progress
  • Spinner
  • Code snippet
  • Icon
  • Layout
  • Primitives
  • Separator
  • Sidenav
  • Sticky
  • Waypoint (Scrollspy)
  • Off-canvas
  • Navbar
  • Footer
Navbar

VdNavbar is a responsive top navigation bar with brand, default, and actions slots, a built-in mobile hamburger + slide-in menu, optional dropdowns, and scroll-aware glass/transparent framing. It emits open/close/toggle and exposes imperative open() / close() / toggle() controls.

Live Demo

A real <VdNavbar> (rendered position="static" so it stays inside the card). Narrow the viewport to reveal the hamburger and slide-in menu.

Brand
  • Home
  • Docs
  • About

Mobile menu is closed (from the @toggle event).

Dark Theme (dark prop)
Vanduo
  • Home
  • Features
  • Pricing
Usage

Compose the bar with the three named slots. The default slot is the collapsible menu — drop a .vd-navbar-nav list inside it:

<script setup lang="ts">
import { VdNavbar } from "@vanduo-oss/vd3";
</script>

<template>
  <VdNavbar position="sticky">
    <template #brand>
      <a href="/">Vanduo</a>
    </template>

    <!-- Default slot: the collapsible menu content -->
    <ul class="vd-navbar-nav">
      <li><a class="vd-nav-link active" href="/">Home</a></li>
      <li><a class="vd-nav-link" href="/docs">Docs</a></li>
      <li><a class="vd-nav-link" href="/about">About</a></li>
    </ul>

    <template #actions>
      <button class="vd-btn vd-btn-primary vd-btn-sm">Sign in</button>
    </template>
  </VdNavbar>
</template>
Nested Dropdowns

Wrap a nav item in .vd-navbar-dropdown with a .vd-navbar-dropdown-menu child. Below the collapse breakpoint the parent link toggles the submenu instead of navigating:

<VdNavbar>
  <ul class="vd-navbar-nav">
    <li><a class="vd-nav-link active" href="/">Home</a></li>
    <li class="vd-navbar-dropdown">
      <a class="vd-nav-link" href="#">Products</a>
      <div class="vd-navbar-dropdown-menu">
        <a class="vd-navbar-dropdown-item" href="/app">App</a>
        <a class="vd-navbar-dropdown-item" href="/api">API</a>
      </div>
    </li>
  </ul>
</VdNavbar>
CSS Variables
VariableDefault
--vd-navbar-bgvar(--vd-color-white)
--vd-navbar-text-colorvar(--vd-text-primary)
--vd-navbar-link-colorvar(--vd-text-primary)
--vd-navbar-link-hover-colorvar(--vd-color-primary)
--vd-navbar-link-active-colorvar(--vd-color-primary)
--vd-navbar-height3.4375rem (55px, fib)
--vd-navbar-padding-x1.3125rem (21px, fib)
--vd-navbar-nav-gap1.3125rem (21px, fib)
--vd-navbar-actions-gap2.125rem (34px, fib)
--vd-navbar-mobile-menu-width233px (fib)
API Reference

Props

PropTypeDescription
variant"solid" | "transparent" | "glass"Surface treatment (default "solid"). glass/transparent gain scroll-activated framing (the .vd-navbar-scrolled class engages once you scroll past the threshold).
darkbooleanApplies the dark navbar theme (.vd-navbar-dark). Orthogonal to variant. Default false.
position"static" | "fixed" | "fixed-bottom" | "sticky"Positioning modifier (default "static"). fixed / fixed-bottom / sticky attach the bar to the viewport.
scrollThresholdnumberScroll distance in px before .vd-navbar-scrolled engages for glass/transparent variants (default: component-resolved).
toggleLabelstringAccessible label for the mobile hamburger toggle (default "Toggle navigation").
closeOnNavigatebooleanClose the mobile menu when a non-dropdown nav link is clicked (default true).

Events

EventPayloadDescription
open—Emitted when the mobile menu opens.
close—Emitted when the mobile menu closes.
toggleopen: booleanEmitted on every open/close with the new menu state.

Slots

SlotDescription
brandBrand / logo area, rendered inside .vd-navbar-brand. Omitted from the DOM when empty.
defaultThe collapsible menu content — place your <ul class="vd-navbar-nav"> here. Rendered inside .vd-navbar-menu.
actionsTrailing CTA area (buttons, theme switcher…), rendered inside .vd-navbar-actions. Omitted when empty.

Exposed (template ref)

MemberDescription
isOpenReactive boolean reflecting the mobile-menu open state.
open()Imperatively open the mobile menu.
close()Imperatively close the mobile menu.
toggle()Imperatively toggle the mobile menu.

CSS Classes (slot content)

ClassDescription
.vd-navbar-navList wrapper for a group of navigation links (place in the default slot).
.vd-nav-linkIndividual link within the menu. Append .active for the current route.
.vd-navbar-dropdownWraps a nav item that owns a nested menu; below the breakpoint its link toggles the submenu instead of navigating.
.vd-navbar-dropdown-menuContainer for the nested dropdown items (add .is-open is handled for you on mobile).
.vd-navbar-dropdown-itemIndividual link inside a dropdown menu.

vd3ui

Quick Links

  • Home
  • Docs
  • Changelog
  • About

Resources

  • GitHub
  • NPM
  • Kilo OSS
  • License

2026, Vanduo UI. MIT License.