{
  "$schema": "https://design.senvenli.com/schema/component.full.json",
  "kind": "component",
  "family": "overlay",
  "status": "alpha",
  "import": "@senvenli/react/overlay",
  "name": "context-menu",
  "title": "Context menu",
  "exports": [
    "ContextMenu",
    "ContextMenuTrigger"
  ],
  "description": "The actions for what is under the pointer, opened by a right-click, a long press or Shift+F10.",
  "keywords": [
    "actions",
    "compound",
    "context menu",
    "long press",
    "right click"
  ],
  "usage": {
    "when": [
      "Rows, cards or a canvas where people expect right-click actions."
    ],
    "instead": [
      {
        "use": "menu",
        "when": "The actions belong to a visible button."
      }
    ]
  },
  "guidance": [
    {
      "rule": "Never the only way to an action: put it in a visible Menu too."
    },
    {
      "rule": "Same order as the row's menu."
    }
  ],
  "a11y": {
    "builtIn": [
      "Opens at the pointer, or under the focused element with Shift+F10 or the Menu key; focus goes back on close."
    ],
    "youProvide": [
      "An aria-label for the menu.",
      "With children: a textValue on a MenuItem whose label is not plain text, so typing can jump to it; the destructive item last, after a MenuSeparator."
    ]
  },
  "related": [
    "menu"
  ],
  "genui": {
    "expose": false
  },
  "source": [
    "src/overlay/context-menu.tsx"
  ],
  "props": {
    "ContextMenu": [
      {
        "name": "children",
        "type": "React.ReactNode",
        "required": true,
        "origin": "own",
        "description": "The region a right-click, a long press or Shift+F10 opens the menu on: a row, a card, a canvas. Or, to compose\nthe menu from parts: a `ContextMenuTrigger` holding that region, followed by `MenuItem`, `MenuSection`,\n`MenuSubmenu` and `MenuSeparator`."
      },
      {
        "name": "items",
        "type": "readonly MenuEntry[]",
        "required": false,
        "origin": "own",
        "description": "The menu as data; leave it out when composing with a `ContextMenuTrigger`."
      },
      {
        "name": "onAction",
        "type": "(id: Key) => void",
        "required": false,
        "origin": "own"
      },
      {
        "name": "disabledKeys",
        "type": "Iterable<Key>",
        "required": false,
        "origin": "own"
      },
      {
        "name": "aria-label",
        "type": "string",
        "required": true,
        "origin": "own",
        "description": "Names the menu (\"Actions for ORD-482\").",
        "schema": {
          "type": "string"
        }
      }
    ],
    "ContextMenuTrigger": [
      {
        "name": "children",
        "type": "React.ReactNode",
        "required": true,
        "origin": "own",
        "description": "The region that opens the menu."
      }
    ]
  },
  "tokens": [
    "ds-background-neutral-bold",
    "ds-background-neutral-pressed",
    "ds-background-neutral-subtle-hovered",
    "ds-blanket",
    "ds-border",
    "ds-border-focused",
    "ds-easing-enter",
    "ds-easing-exit",
    "ds-icon-danger",
    "ds-icon-subtle",
    "ds-radius-large",
    "ds-radius-small",
    "ds-radius-xlarge",
    "ds-shadow-overlay",
    "ds-space-050",
    "ds-space-075",
    "ds-space-100",
    "ds-space-150",
    "ds-space-200",
    "ds-space-300",
    "ds-surface-overlay",
    "ds-text",
    "ds-text-danger",
    "ds-text-disabled",
    "ds-text-inverse",
    "ds-text-subtle",
    "ds-text-subtlest",
    "font-ds-mono"
  ],
  "strings": [],
  "quality": {
    "tests": true,
    "a11y": false,
    "docs": false,
    "visual": false,
    "dark": false,
    "rtl": false,
    "mcp": true,
    "generic": true
  }
}
