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
Menu

VdMenu is a declarative dropdown menu: pass a label and an items array and it renders an accessible role="menu" popup, reusing the framework's dropdown runtime for toggle, keyboard and outside-click behaviour. To wire hand-written dropdown markup instead, call useDropdown(root).

Actions Menu
EditDuplicate
Archived (disabled)Delete

Last action: —

<div class="vd-dropdown">
  <button type="button" class="vd-btn vd-btn-secondary vd-dropdown-toggle"
          data-vd-dropdown-toggle aria-haspopup="menu">Actions</button>
  <div class="vd-dropdown-menu" role="menu">
    <a class="vd-dropdown-item" role="menuitem" href="#">Edit</a>
    <a class="vd-dropdown-item" role="menuitem" href="#">Duplicate</a>
    <div class="vd-dropdown-divider" role="separator"></div>
    <a class="vd-dropdown-item is-disabled" role="menuitem" aria-disabled="true">Archived</a>
    <a class="vd-dropdown-item" role="menuitem" href="#">Delete</a>
  </div>
</div>

<!-- Wire hand-written dropdown markup with useDropdown(root), or just render <VdMenu> (below). -->
End-Aligned
Newest firstOldest firstA → Z

Sorting by: —

<div class="vd-dropdown">
  <button type="button" class="vd-btn vd-btn-secondary vd-dropdown-toggle"
          data-vd-dropdown-toggle aria-haspopup="menu">Sort</button>
  <div class="vd-dropdown-menu vd-dropdown-menu-end" role="menu">
    <a class="vd-dropdown-item" role="menuitem" href="#">Newest first</a>
    <a class="vd-dropdown-item" role="menuitem" href="#">Oldest first</a>
    <a class="vd-dropdown-item" role="menuitem" href="#">A → Z</a>
  </div>
</div>
Link Menu

Items with an href navigate instead of emitting.

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

const items = [
  { label: "Edit", value: "edit" },
  { label: "Duplicate", value: "duplicate" },
  { divider: true },
  { label: "Delete", value: "delete" },
];

const onSelect = (value: string) => console.log(value);
</script>

<template>
  <VdMenu label="Actions" :items="items" @select="onSelect" />
</template>
API Reference

Usage

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

const items = [
  { label: "Edit", value: "edit" },
  { label: "Duplicate", value: "duplicate" },
  { divider: true },
  { label: "Delete", value: "delete" },
];

const onSelect = (value: string) => console.log(value);
</script>

<template>
  <VdMenu label="Actions" :items="items" @select="onSelect" />
</template>

CSS Classes

ClassDescription
.vd-dropdownPositioning wrapper around the trigger and the menu
.vd-dropdown-toggleThe trigger button. `data-vd-dropdown-toggle` wires the dropdown runtime
.vd-dropdown-menuThe popup list; absolutely positioned under the toggle
.vd-dropdown-menu-endAligns the menu to the trigger's end edge
.vd-dropdown-itemAn individual menu entry (rendered as <a>)
.vd-dropdown-item.is-disabledNon-interactive item; pair with aria-disabled
.vd-dropdown-dividerA separator rule between groups of items

Component API

Prop / eventDescription
:labelText shown on the trigger button.
:itemsArray of { label, value?, href?, disabled?, divider? }. value defaults to label.
:align'start' | 'end' — which edge the menu aligns to (default 'start').
@selectFired with the chosen item's value (or label). Dividers / disabled items don't emit.

Events

EventDescription
select (Vue) Emitted with the chosen item's value (or its label when no value is set). Items that are dividers, disabled, or links don't emit.
Accessibility
  • The trigger declares aria-haspopup="menu" and the popup carries role="menu" with each entry as role="menuitem".
  • Disabled items set aria-disabled="true" and don't fire select; dividers use role="separator".
  • The shared dropdown runtime handles Esc to close, outside-click dismissal, and keyboard focus management.

vd3ui

Quick Links

  • Home
  • Docs
  • Changelog
  • About

Resources

  • GitHub
  • NPM
  • Kilo OSS
  • License

2026, Vanduo UI. MIT License.