Skip to content
Velkin LogoVelkin Logo
Velkin
VELKIN/UI

Modern UI components for product teams and their AI agents. Lit core, typed wrappers, live MCP.

sales@velkinui.com

Product

  • Docs
  • Components
  • Studio
  • Pricing

Resources

  • Quick start
  • Blog
  • Changelog
  • Roadmap
  • Status

Project

  • About
  • Contact
  • License
  • Privacy
  • Terms

© 2026 Velkin. MIT core · Pro licenses available.

VELKIN

Context Menu

Pro

A context menu component with grouped actions and icons.

vu-context-menu · @velkin/react-pro/context-menu

Copy page

Import

React
npm i @velkin/react-pro

import { LicenseInfo } from "@velkin/license";
// Vite: import.meta.env.VITE_VELKIN_LICENSE_KEY
// Next: process.env.NEXT_PUBLIC_VELKIN_LICENSE_KEY
LicenseInfo.setLicenseKey(import.meta.env.VITE_VELKIN_LICENSE_KEY ?? process.env.NEXT_PUBLIC_VELKIN_LICENSE_KEY ?? "");

// @velkin-pro
import { VuContextMenu } from "@velkin/react-pro/context-menu";

Examples

API

Props

PropTypeDefaultDescription
itemsVuContextMenuItem[][]Menu entries with optional icons, grouping, and target filtering.
contextnull | { target: VuContextMenuTarget; clientX: number; clientY: number; graphX?: number; graphY?: number; node?: unknown; edge?: unknown; nodes?: unknown[]; edges?: unknown[]; value?: string; data?: unknown; }nullActive pointer context from `openAt` or a host such as `<vu-flow>`.
overlaybooleanfalseWhen true, renders a viewport overlay positioned at `context.clientX/Y`. Default: `false` for `<vu-flow>` slot usage.
openbooleanfalseReflected open state when visible rows or slotted content are shown.
variantVuContextMenuVariant"elevated"Panel surface recipe (`elevated`/`outline`/`soft`). Default: `"elevated"`.
toneVuContextMenuTone"normal"Neutral surface weight. Default: `"normal"`.
sizeVuContextMenuSize"md"Row density (`sm`, `md`, `lg`). Default: `md`.
radiusVuContextMenuRadius"md"Panel corner preset (`sm`/`md`/`lg`). Default: `"md"`.
labelstring""Accessible name for the menu panel; localized default when empty.

Events

EventDetailDescription
vu-activateVuContextMenuItemClickDetailWhen a menu row is activated.
vu-openCustomEvent<void>When the menu becomes visible.
vu-closeCustomEvent<void>When the menu hides.

Slots

SlotDescription
—- Optional custom menu content when not using `items`.

CSS parts

PartDescription
backdropFull-screen dismiss layer in `overlay` mode.
panelMenu surface (`role="menu"`).
submenuNested flyout panel for rows with `children`.
itemAction row button.
item-labelVisible label text inside a row.
dividerHorizontal separator between rows or groups.
group-labelUppercase section label above a group.

Methods

MethodDescription
hasVisibleItemsReturns true when at least one row is visible for the active `context`.
openAtOpens the menu at viewport coordinates.
closeClears `context` and hides the menu.

Types

NameDefinition
VuContextMenuContext | null
null
| {
  target: VuContextMenuTarget;
  clientX: number;
  clientY: number;
  graphX?: number;
  graphY?: number;
  node?: unknown;
  edge?: unknown;
  nodes?: unknown[];
  edges?: unknown[];
  value?: string;
  data?: unknown;
}
VuContextMenuItemClickDetail
{
  item: VuContextMenuItem;
  context: VuContextMenuContext;
}
VuContextMenuRadius
"sm" | "md" | "lg"
VuContextMenuSize
"sm" | "md" | "lg"
VuContextMenuTone
"subtle" | "normal" | "strong"
VuContextMenuVariant
"outline" | "elevated" | "soft"

Related

Navigation

  • Adaptive BarA responsive toolbar component that overflows extra items into a menu.
  • AppbarAn application bar component with start, center, and end slots.
  • BreadcrumbA breadcrumb component for navigation trails with optional collapse.
  • DropdownA dropdown menu component with trigger slot and keyboard navigation.
  • MenubarA menubar component with nested submenus and keyboard navigation.
  • Nav PanelA navigation panel component for drawer bodies with icon-rail collapse.

Guides

  • Pro licenseLicenseInfo and Pro imports
  • AccessibilityFocus and naming
  • SlotsHeader, body, and item slots

Browse

  • Previous: BreadcrumbEarlier in the sidebar
  • Next: DropdownLater in the sidebar
  • All componentsBrowse the full index