Skip to contents
Interfaces DS
Landing Page

Context Menu

Right-click a target to open actions for that item. Try a submenu, a checkbox item and a group of radio items.

On this page

Usage

Right click here

Installation

  1. Set up your license key before connecting the private registry.

    Connect this project to https://docs.interfacesds.com using the full URL shown below, including {name}. In components.json, add the registries field at the top level. If the field already exists, add only the @interfaces-ds entry inside it. Keep your existing aliases and other registries.

    For a global stylesheet in app/ or src/app/.

    JSON
    {
      "registries": {
        "@interfaces-ds": {
          "url": "https://docs.interfacesds.com/r/{name}.json",
          "headers": {
            "Authorization": "Bearer ${INTERFACES_DS_LICENSE_KEY}"
          }
        }
      }
    }
  2. Install the component.

    Terminal
    npx shadcn@latest add @interfaces-ds/context-menu

API reference

Import these exports from @/components/ui/context-menu. The tables cover component-specific props and common controls.

ContextMenu
PropTypeDefault
defaultOpenboolean—
disabledboolean—
modalboolean—
onOpenChange(open: boolean, eventDetails: ContextMenuPrimitive.Root.ChangeEventDetails) => void—
openboolean—
orientation"horizontal" | "vertical"—
ContextMenuTrigger
PropTypeDefault
asChildboolean—
ContextMenuContent
PropTypeDefault
forceMounttrue—
ContextMenuItem
PropTypeDefault
asChildboolean—
disabledboolean—
insetboolean—
labelstring—
variant"default" | "danger""default"
ContextMenuCheckboxItem
PropTypeDefault
asChildboolean—
checkedboolean—
defaultCheckedboolean—
disabledboolean—
labelstring—
onCheckedChange(checked: boolean, eventDetails: ContextMenuPrimitive.CheckboxItem.ChangeEventDetails) => void—
ContextMenuRadioItem
PropTypeDefault
asChildboolean—
disabledboolean—
labelstring—
ContextMenuLabel
PropTypeDefault
insetboolean—
ContextMenuSeparator
PropTypeDefault
orientation"horizontal" | "vertical"—
ContextMenuShortcut
ContextMenuGroup
ContextMenuPortal
PropTypeDefault
forceMounttrue—
keepMountedboolean—
ContextMenuSub
PropTypeDefault
defaultOpenboolean—
disabledboolean—
onOpenChange(open: boolean, eventDetails: ContextMenuPrimitive.SubmenuRoot.ChangeEventDetails) => void—
openboolean—
orientation"horizontal" | "vertical"—
ContextMenuSubContent
PropTypeDefault
forceMounttrue—
ContextMenuSubTrigger
PropTypeDefault
asChildboolean—
disabledboolean—
insetboolean—
labelstring—
ContextMenuRadioGroup
PropTypeDefault
disabledboolean—
onValueChange(value: any, eventDetails: ContextMenuPrimitive.RadioGroup.ChangeEventDetails) => void—