# @fayegram-ai/faye-ui/overlays/context-menu

Public exports and dependency-resolved component properties, with usage and rendering guidance.

## Import

```tsx
import { ContextMenu } from '@fayegram-ai/faye-ui/overlays/context-menu';
```

[Usage and behavior guide](/docs/menus/) · [API JSON](/api/packages/overlays/context-menu.json)

This entry declares a client boundary. Follow the rendering guide for framework integration.

## Public exports

| Name | Kind | Resolved declaration type |
|---|---|---|
| `ContextMenu` | value | `Omit<{ readonly Root: typeof MenuRoot; readonly SubmenuRoot: typeof Base.SubmenuRoot; readonly RadioGroup: NamedExoticComponent<Omit<MenuRadioGroupProps, "ref"> & RefAttributes<HTMLDivElement>>; readonly Trigger: { (input: MenuTriggerProps<unknown> & RefAttributes<HTMLElement> & { variants?: { readonly size?: import("packages/faye-ui/dist/contracts/visual-variants").VisualVariant<"menu", "size"> \| undefined; readonly tone?: import("packages/faye-ui/dist/contracts/visual-variants").VisualVariant<"menu", "tone"> \| undefined; } \| undefined; }): ReactElement<unknown, string \| JSXElementConstructor<any>>; displayName: string; }; readonly Positioner: { (input: Omit<MenuPositionerProps, "ref"> & RefAttributes<HTMLDivElement> & { variants?: { readonly size?: import("packages/faye-ui/dist/contracts… (full type in API JSON)` |

## ContextMenu

Public component; use the linked family guide for complete composition and behavior.

Dependency-resolved declaration properties. Common React/native HTML attributes are omitted from the table; use the full declaration and React/native references. Generic and union restrictions remain authoritative in TypeScript.

### ContextMenu.SubmenuRoot

| Property | Required | Type | Meaning |
|---|---|---|---|
| `actionsRef` | No | `React.RefObject<MenuRootActions \| null> \| undefined` | A ref to imperative actions. - `unmount`: Manually unmounts the menu. Call this after any externally controlled closing animation finishes. - `close`: When specified, the menu can be closed imperatively. |
| `children` | No | `React.ReactNode` | The content of the submenu. |
| `closeParentOnEsc` | No | `boolean \| undefined` | When in a submenu, determines whether pressing the Escape key closes the entire menu, or only the current child menu. |
| `defaultOpen` | No | `boolean \| undefined` | Whether the menu is initially open. To render a controlled menu, use the `open` prop instead. |
| `disabled` | No | `boolean \| undefined` | Whether the component should ignore user interaction. |
| `highlightItemOnHover` | No | `boolean \| undefined` | Whether moving the pointer over items should highlight them. Disabling this prop allows CSS `:hover` to be differentiated from the `:focus` (`data-highlighted`) state. |
| `loopFocus` | No | `boolean \| undefined` | Whether to loop keyboard focus back to the first item when the end of the list is reached while using the arrow keys. |
| `onOpenChange` | No | `((open: boolean, eventDetails: MenuSubmenuRoot.ChangeEventDetails) => void) \| undefined` | Event handler called when the menu is opened or closed. |
| `onOpenChangeComplete` | No | `((open: boolean) => void) \| undefined` | Event handler called after any animations complete when the menu is opened or closed. |
| `open` | No | `boolean \| undefined` | Whether the menu is currently open. |
| `orientation` | No | `MenuRootOrientation \| undefined` | The visual orientation of the menu. Controls whether roving focus uses up/down or left/right arrow keys. |

### ContextMenu.RadioGroup

| Property | Required | Type | Meaning |
|---|---|---|---|
| `children` | No | `ReactNode` | The content of the component. |
| `className` | No | `string \| ((state: MenuRadioGroupState) => string \| undefined) \| undefined` | CSS class applied to the element, or a function that returns a class based on the component's state. |
| `defaultValue` | No | `any` | The uncontrolled value of the radio item that should be initially selected. To render a controlled radio group, use the `value` prop instead. |
| `disabled` | No | `boolean \| undefined` | Whether the component should ignore user interaction. |
| `onValueChange` | No | `((value: any, eventDetails: MenuRadioGroup.ChangeEventDetails) => void) \| undefined` | Function called when the selected value changes. |
| `render` | No | `ReactElement<unknown, string \| JSXElementConstructor<any>> \| ComponentRenderFn<HTMLProps, MenuRadioGroupState> \| undefined` | Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a `ReactElement` or a function that returns the element to render. |
| `style` | No | `CSSProperties \| ((state: MenuRadioGroupState) => React.CSSProperties \| undefined) \| undefined` | Style applied to the element, or a function that returns a style object based on the component's state. |
| `value` | No | `any` | The controlled value of the radio item that should be currently selected. To render an uncontrolled radio group, use the `defaultValue` prop instead. |

### ContextMenu.Positioner

| Property | Required | Type | Meaning |
|---|---|---|---|
| `align` | No | `Align \| undefined` | How to align the popup relative to the specified side. Submenus and menubars default to `'start'`. |
| `alignOffset` | No | `number \| OffsetFunction \| undefined` | Additional offset along the alignment axis in pixels. Also accepts a function that returns the offset to read the dimensions of the anchor and positioner elements, along with its side and alignment. The function takes a `data` object parameter with the following properties: - `data.anchor`: the dimensions of the anchor element with properties `width` and `height`. - `data.positioner`: the dimensions of the positioner element with properties `width` and `height`. - `data.side`: which side of the anchor element the positioner is aligned against. - `data.align`: how the positioner is aligned relative to the specified side. |
| `anchor` | No | `Element \| VirtualElement \| RefObject<Element \| null> \| (() => Element \| VirtualElement \| null) \| null \| undefined` | An element to position the popup against. By default, the popup will be positioned against the trigger. |
| `arrowPadding` | No | `number \| undefined` | Minimum distance to maintain between the arrow and the edges of the popup. Use it to prevent the arrow element from hanging out of the rounded corners of a popup. |
| `className` | No | `string \| ((state: MenuPositionerState) => string \| undefined) \| undefined` | CSS class applied to the element, or a function that returns a class based on the component's state. |
| `collisionAvoidance` | No | `CollisionAvoidance \| undefined` | Determines how to handle collisions when positioning the popup. `side` controls overflow on the preferred placement axis (`top`/`bottom` or `left`/`right`): - `'flip'`: keep the requested side when it fits; otherwise try the opposite side (`top` and `bottom`, or `left` and `right`). - `'shift'`: never change side; keep the requested side and move the popup within the clipping boundary so it stays visible. - `'none'`: do not correct side-axis overflow. `align` controls overflow on the alignment axis (`start`/`center`/`end`): - `'flip'`: keep side, but swap `start` and `end` when the requested alignment overflows. - `'shift'`: keep side and requested alignment, then nudge the popup along the alignment axis to fit. - `'none'`: do not correct alignment-axis overflow. `fallbackAxisSide` controls fallback behavior on the perpendicular axis when the preferred axis cannot fit: - `'start'`: allow perpendicular fallback and try the logical start side first (`top` before `bottom`, or `left` before `right` in LTR). - `'end'`: allow perpendicular fallback and try the logical end side first (`bottom` before `top`, or `right` before `left` in LTR). - `'none'`: do not fallback to the perpendicular axis. When `side` is `'shift'`, explicitly setting `align` only supports `'shift'` or `'none'`. If `align` is omitted, it defaults to `'flip'`. |
| `collisionBoundary` | No | `Boundary \| undefined` | An element or a rectangle that delimits the area that the popup is confined to. |
| `collisionPadding` | No | `Padding \| undefined` | Additional space to maintain from the edge of the collision boundary. |
| `disableAnchorTracking` | No | `boolean \| undefined` | Whether to disable the popup from tracking any layout shift of its positioning anchor. |
| `positionMethod` | No | `"absolute" \| "fixed" \| undefined` | Determines which CSS `position` property to use. |
| `render` | No | `ReactElement<unknown, string \| JSXElementConstructor<any>> \| ComponentRenderFn<HTMLProps, MenuPositionerState> \| undefined` | Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a `ReactElement` or a function that returns the element to render. |
| `side` | No | `Side \| undefined` | Which side of the anchor element to align the popup against. May automatically change to avoid collisions. Submenus and vertical menubars default to `'inline-end'`. |
| `sideOffset` | No | `number \| OffsetFunction \| undefined` | Distance between the anchor and the popup in pixels. Also accepts a function that returns the distance to read the dimensions of the anchor and positioner elements, along with its side and alignment. The function takes a `data` object parameter with the following properties: - `data.anchor`: the dimensions of the anchor element with properties `width` and `height`. - `data.positioner`: the dimensions of the positioner element with properties `width` and `height`. - `data.side`: which side of the anchor element the positioner is aligned against. - `data.align`: how the positioner is aligned relative to the specified side. |
| `sticky` | No | `boolean \| undefined` | Whether to maintain the popup in the viewport after the anchor element was scrolled out of view. |
| `style` | No | `CSSProperties \| ((state: MenuPositionerState) => React.CSSProperties \| undefined) \| undefined` | Style applied to the element, or a function that returns a style object based on the component's state. |
| `variants` | No | `{ readonly size?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"menu", "size"> \| undefined; readonly tone?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"menu", "tone"> \| undefined; } \| undefined` | See the usage contract and declaration. |

### ContextMenu.Popup

| Property | Required | Type | Meaning |
|---|---|---|---|
| `children` | No | `ReactNode` | See the usage contract and declaration. |
| `className` | No | `string \| ((state: MenuPopupState) => string \| undefined) \| undefined` | CSS class applied to the element, or a function that returns a class based on the component's state. |
| `finalFocus` | No | `boolean \| RefObject<HTMLElement \| null> \| ((closeType: InteractionType) => boolean \| HTMLElement \| null \| void) \| undefined` | Determines the element to focus when the menu is closed. - `false`: Do not move focus. - `true`: Move focus based on the default behavior (trigger or previously focused element). - `RefObject`: Move focus to the ref element. - `function`: Called with the interaction type (`mouse`, `touch`, `pen`, or `keyboard`). Return an element to focus, `true` to use the default behavior, or `false`/`undefined` to do nothing. |
| `id` | No | `string \| undefined` | See the usage contract and declaration. |
| `render` | No | `ReactElement<unknown, string \| JSXElementConstructor<any>> \| ComponentRenderFn<HTMLProps, MenuPopupState> \| undefined` | Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a `ReactElement` or a function that returns the element to render. |
| `style` | No | `CSSProperties \| ((state: MenuPopupState) => React.CSSProperties \| undefined) \| undefined` | Style applied to the element, or a function that returns a style object based on the component's state. |
| `variants` | No | `{ readonly size?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"menu", "size"> \| undefined; readonly tone?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"menu", "tone"> \| undefined; } \| undefined` | See the usage contract and declaration. |

### ContextMenu.Item

| Property | Required | Type | Meaning |
|---|---|---|---|
| `className` | No | `string \| ((state: MenuItemState) => string \| undefined) \| undefined` | CSS class applied to the element, or a function that returns a class based on the component's state. |
| `closeOnClick` | No | `boolean \| undefined` | Whether to close the menu when the item is clicked. |
| `disabled` | No | `boolean \| undefined` | Whether the component should ignore user interaction. |
| `id` | No | `string \| undefined` | See the usage contract and declaration. |
| `label` | No | `string \| undefined` | Overrides the text label to use when the item is matched during keyboard text navigation. |
| `nativeButton` | No | `boolean \| undefined` | Whether the component renders a native `<button>` element when replacing it via the `render` prop. Set to `true` if the rendered element is a native button. |
| `onClick` | No | `((event: BaseUIEvent<MouseEvent<HTMLDivElement, MouseEvent>>) => void) \| undefined` | The click handler for the menu item. |
| `render` | No | `ReactElement<unknown, string \| JSXElementConstructor<any>> \| ComponentRenderFn<HTMLProps, MenuItemState> \| undefined` | Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a `ReactElement` or a function that returns the element to render. |
| `style` | No | `CSSProperties \| ((state: MenuItemState) => React.CSSProperties \| undefined) \| undefined` | Style applied to the element, or a function that returns a style object based on the component's state. |
| `variants` | No | `{ readonly size?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"menu", "size"> \| undefined; readonly tone?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"menu", "tone"> \| undefined; } \| undefined` | See the usage contract and declaration. |

### ContextMenu.LinkItem

| Property | Required | Type | Meaning |
|---|---|---|---|
| `className` | No | `string \| ((state: MenuLinkItemState) => string \| undefined) \| undefined` | CSS class applied to the element, or a function that returns a class based on the component's state. |
| `closeOnClick` | No | `boolean \| undefined` | Whether to close the menu when the item is clicked. |
| `id` | No | `string \| undefined` | See the usage contract and declaration. |
| `label` | No | `string \| undefined` | Overrides the text label to use when the item is matched during keyboard text navigation. |
| `render` | No | `ReactElement<unknown, string \| JSXElementConstructor<any>> \| ComponentRenderFn<DetailedHTMLProps<AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, MenuLinkItemState> \| undefined` | Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a `ReactElement` or a function that returns the element to render. |
| `style` | No | `CSSProperties \| ((state: MenuLinkItemState) => React.CSSProperties \| undefined) \| undefined` | Style applied to the element, or a function that returns a style object based on the component's state. |
| `variants` | No | `{ readonly size?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"menu", "size"> \| undefined; readonly tone?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"menu", "tone"> \| undefined; } \| undefined` | See the usage contract and declaration. |

### ContextMenu.CheckboxItemIndicator

| Property | Required | Type | Meaning |
|---|---|---|---|
| `className` | No | `string \| ((state: MenuCheckboxItemIndicatorState) => string \| undefined) \| undefined` | CSS class applied to the element, or a function that returns a class based on the component's state. |
| `keepMounted` | No | `boolean \| undefined` | Whether to keep the HTML element in the DOM when the checkbox item is not checked. |
| `render` | No | `ReactElement<unknown, string \| JSXElementConstructor<any>> \| ComponentRenderFn<HTMLProps, MenuCheckboxItemIndicatorState> \| undefined` | Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a `ReactElement` or a function that returns the element to render. |
| `style` | No | `CSSProperties \| ((state: MenuCheckboxItemIndicatorState) => React.CSSProperties \| undefined) \| undefined` | Style applied to the element, or a function that returns a style object based on the component's state. |
| `variants` | No | `{ readonly size?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"menu", "size"> \| undefined; readonly tone?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"menu", "tone"> \| undefined; } \| undefined` | See the usage contract and declaration. |

### ContextMenu.RadioItemIndicator

| Property | Required | Type | Meaning |
|---|---|---|---|
| `className` | No | `string \| ((state: MenuRadioItemIndicatorState) => string \| undefined) \| undefined` | CSS class applied to the element, or a function that returns a class based on the component's state. |
| `keepMounted` | No | `boolean \| undefined` | Whether to keep the HTML element in the DOM when the radio item is inactive. |
| `render` | No | `ReactElement<unknown, string \| JSXElementConstructor<any>> \| ComponentRenderFn<HTMLProps, MenuRadioItemIndicatorState> \| undefined` | Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a `ReactElement` or a function that returns the element to render. |
| `style` | No | `CSSProperties \| ((state: MenuRadioItemIndicatorState) => React.CSSProperties \| undefined) \| undefined` | Style applied to the element, or a function that returns a style object based on the component's state. |
| `variants` | No | `{ readonly size?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"menu", "size"> \| undefined; readonly tone?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"menu", "tone"> \| undefined; } \| undefined` | See the usage contract and declaration. |

### ContextMenu.Backdrop

**Example disposition:** Optional popup presentation parts. The live menu demonstrates keyboard actions, checked/radio state and submenu composition with an unadorned popup.

| Property | Required | Type | Meaning |
|---|---|---|---|
| `className` | No | `string \| ((state: MenuBackdropState) => string \| undefined) \| undefined` | CSS class applied to the element, or a function that returns a class based on the component's state. |
| `render` | No | `ReactElement<unknown, string \| JSXElementConstructor<any>> \| ComponentRenderFn<HTMLProps, MenuBackdropState> \| undefined` | Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a `ReactElement` or a function that returns the element to render. |
| `style` | No | `CSSProperties \| ((state: MenuBackdropState) => React.CSSProperties \| undefined) \| undefined` | Style applied to the element, or a function that returns a style object based on the component's state. |
| `variants` | No | `{ readonly size?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"menu", "size"> \| undefined; readonly tone?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"menu", "tone"> \| undefined; } \| undefined` | See the usage contract and declaration. |

### ContextMenu.Arrow

**Example disposition:** Optional popup presentation parts. The live menu demonstrates keyboard actions, checked/radio state and submenu composition with an unadorned popup.

| Property | Required | Type | Meaning |
|---|---|---|---|
| `className` | No | `string \| ((state: MenuArrowState) => string \| undefined) \| undefined` | CSS class applied to the element, or a function that returns a class based on the component's state. |
| `render` | No | `ReactElement<unknown, string \| JSXElementConstructor<any>> \| ComponentRenderFn<HTMLProps, MenuArrowState> \| undefined` | Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a `ReactElement` or a function that returns the element to render. |
| `style` | No | `CSSProperties \| ((state: MenuArrowState) => React.CSSProperties \| undefined) \| undefined` | Style applied to the element, or a function that returns a style object based on the component's state. |
| `variants` | No | `{ readonly size?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"menu", "size"> \| undefined; readonly tone?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"menu", "tone"> \| undefined; } \| undefined` | See the usage contract and declaration. |

### ContextMenu.Viewport

**Example disposition:** Optional popup presentation parts. The live menu demonstrates keyboard actions, checked/radio state and submenu composition with an unadorned popup.

| Property | Required | Type | Meaning |
|---|---|---|---|
| `children` | No | `ReactNode` | The content to render inside the transition container. |
| `className` | No | `string \| ((state: MenuViewportState) => string \| undefined) \| undefined` | CSS class applied to the element, or a function that returns a class based on the component's state. |
| `render` | No | `ReactElement<unknown, string \| JSXElementConstructor<any>> \| ComponentRenderFn<HTMLProps, MenuViewportState> \| undefined` | Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a `ReactElement` or a function that returns the element to render. |
| `style` | No | `CSSProperties \| ((state: MenuViewportState) => React.CSSProperties \| undefined) \| undefined` | Style applied to the element, or a function that returns a style object based on the component's state. |
| `variants` | No | `{ readonly size?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"menu", "size"> \| undefined; readonly tone?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"menu", "tone"> \| undefined; } \| undefined` | See the usage contract and declaration. |

### ContextMenu.CheckboxItem

| Property | Required | Type | Meaning |
|---|---|---|---|
| `checked` | No | `boolean \| undefined` | Whether the checkbox item is currently ticked. To render an uncontrolled checkbox item, use the `defaultChecked` prop instead. |
| `className` | No | `string \| ((state: MenuCheckboxItemState) => string \| undefined) \| undefined` | CSS class applied to the element, or a function that returns a class based on the component's state. |
| `closeOnClick` | No | `boolean \| undefined` | Whether to close the menu when the item is clicked. |
| `defaultChecked` | No | `boolean \| undefined` | Whether the checkbox item is initially ticked. To render a controlled checkbox item, use the `checked` prop instead. |
| `disabled` | No | `boolean \| undefined` | Whether the component should ignore user interaction. |
| `id` | No | `string \| undefined` | See the usage contract and declaration. |
| `label` | No | `string \| undefined` | Overrides the text label to use when the item is matched during keyboard text navigation. |
| `nativeButton` | No | `boolean \| undefined` | Whether the component renders a native `<button>` element when replacing it via the `render` prop. Set to `true` if the rendered element is a native button. |
| `onCheckedChange` | No | `((checked: boolean, eventDetails: Base.CheckboxItem.ChangeEventDetails) => void) \| undefined` | Event handler called when the checkbox item is ticked or unticked. |
| `onClick` | No | `((event: BaseUIEvent<MouseEvent<HTMLDivElement, MouseEvent>>) => void) \| undefined` | The click handler for the menu item. |
| `render` | No | `ReactElement<unknown, string \| JSXElementConstructor<any>> \| ComponentRenderFn<HTMLProps, MenuCheckboxItemState> \| undefined` | Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a `ReactElement` or a function that returns the element to render. |
| `style` | No | `CSSProperties \| ((state: MenuCheckboxItemState) => React.CSSProperties \| undefined) \| undefined` | Style applied to the element, or a function that returns a style object based on the component's state. |
| `variants` | No | `{ readonly size?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"menu", "size"> \| undefined; readonly tone?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"menu", "tone"> \| undefined; } \| undefined` | See the usage contract and declaration. |

### ContextMenu.RadioItem

| Property | Required | Type | Meaning |
|---|---|---|---|
| `className` | No | `string \| ((state: MenuRadioItemState) => string \| undefined) \| undefined` | CSS class applied to the element, or a function that returns a class based on the component's state. |
| `closeOnClick` | No | `boolean \| undefined` | Whether to close the menu when the item is clicked. |
| `disabled` | No | `boolean \| undefined` | Whether the component should ignore user interaction. |
| `id` | No | `string \| undefined` | See the usage contract and declaration. |
| `label` | No | `string \| undefined` | Overrides the text label to use when the item is matched during keyboard text navigation. |
| `nativeButton` | No | `boolean \| undefined` | Whether the component renders a native `<button>` element when replacing it via the `render` prop. Set to `true` if the rendered element is a native button. |
| `onClick` | No | `((event: BaseUIEvent<MouseEvent<HTMLDivElement, MouseEvent>>) => void) \| undefined` | The click handler for the menu item. |
| `render` | No | `ReactElement<unknown, string \| JSXElementConstructor<any>> \| ComponentRenderFn<HTMLProps, MenuRadioItemState> \| undefined` | Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a `ReactElement` or a function that returns the element to render. |
| `style` | No | `CSSProperties \| ((state: MenuRadioItemState) => React.CSSProperties \| undefined) \| undefined` | Style applied to the element, or a function that returns a style object based on the component's state. |
| `value` | Yes | `any` | Value of the radio item. This is the value that will be set in the MenuRadioGroup when the item is selected. |
| `variants` | No | `{ readonly size?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"menu", "size"> \| undefined; readonly tone?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"menu", "tone"> \| undefined; } \| undefined` | See the usage contract and declaration. |

### ContextMenu.Group

| Property | Required | Type | Meaning |
|---|---|---|---|
| `children` | No | `ReactNode` | The content of the component. |
| `className` | No | `string \| ((state: MenuGroupState) => string \| undefined) \| undefined` | CSS class applied to the element, or a function that returns a class based on the component's state. |
| `render` | No | `ReactElement<unknown, string \| JSXElementConstructor<any>> \| ComponentRenderFn<HTMLProps, MenuGroupState> \| undefined` | Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a `ReactElement` or a function that returns the element to render. |
| `style` | No | `CSSProperties \| ((state: MenuGroupState) => React.CSSProperties \| undefined) \| undefined` | Style applied to the element, or a function that returns a style object based on the component's state. |
| `variants` | No | `{ readonly size?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"menu", "size"> \| undefined; readonly tone?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"menu", "tone"> \| undefined; } \| undefined` | See the usage contract and declaration. |

### ContextMenu.GroupLabel

| Property | Required | Type | Meaning |
|---|---|---|---|
| `className` | No | `string \| ((state: MenuGroupLabelState) => string \| undefined) \| undefined` | CSS class applied to the element, or a function that returns a class based on the component's state. |
| `render` | No | `ReactElement<unknown, string \| JSXElementConstructor<any>> \| ComponentRenderFn<HTMLProps, MenuGroupLabelState> \| undefined` | Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a `ReactElement` or a function that returns the element to render. |
| `style` | No | `CSSProperties \| ((state: MenuGroupLabelState) => React.CSSProperties \| undefined) \| undefined` | Style applied to the element, or a function that returns a style object based on the component's state. |
| `variants` | No | `{ readonly size?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"menu", "size"> \| undefined; readonly tone?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"menu", "tone"> \| undefined; } \| undefined` | See the usage contract and declaration. |

### ContextMenu.Separator

| Property | Required | Type | Meaning |
|---|---|---|---|
| `className` | No | `string \| ((state: SeparatorState) => string \| undefined) \| undefined` | CSS class applied to the element, or a function that returns a class based on the component's state. |
| `orientation` | No | `Orientation \| undefined` | The orientation of the separator. |
| `render` | No | `ReactElement<unknown, string \| JSXElementConstructor<any>> \| ComponentRenderFn<HTMLProps, SeparatorState> \| undefined` | Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a `ReactElement` or a function that returns the element to render. |
| `style` | No | `CSSProperties \| ((state: SeparatorState) => React.CSSProperties \| undefined) \| undefined` | Style applied to the element, or a function that returns a style object based on the component's state. |
| `variants` | No | `{ readonly size?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"menu", "size"> \| undefined; readonly tone?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"menu", "tone"> \| undefined; } \| undefined` | See the usage contract and declaration. |

### ContextMenu.SubmenuTrigger

| Property | Required | Type | Meaning |
|---|---|---|---|
| `className` | No | `string \| ((state: MenuSubmenuTriggerState) => string \| undefined) \| undefined` | CSS class applied to the element, or a function that returns a class based on the component's state. |
| `closeDelay` | No | `number \| undefined` | How long to wait before closing the menu that was opened on hover. Specified in milliseconds. Requires the `openOnHover` prop. |
| `delay` | No | `number \| undefined` | How long to wait before the menu may be opened on hover. Specified in milliseconds. Requires the `openOnHover` prop. |
| `disabled` | No | `boolean \| undefined` | Whether the component should ignore user interaction. |
| `id` | No | `string \| undefined` | See the usage contract and declaration. |
| `label` | No | `string \| undefined` | Overrides the text label to use when the item is matched during keyboard text navigation. |
| `nativeButton` | No | `boolean \| undefined` | Whether the component renders a native `<button>` element when replacing it via the `render` prop. Set to `true` if the rendered element is a native button. |
| `onClick` | No | `((event: BaseUIEvent<MouseEvent<HTMLDivElement, MouseEvent>>) => void) \| undefined` | See the usage contract and declaration. |
| `openOnHover` | No | `boolean \| undefined` | Whether the menu should also open when the trigger is hovered. |
| `render` | No | `ReactElement<unknown, string \| JSXElementConstructor<any>> \| ComponentRenderFn<HTMLProps, MenuSubmenuTriggerState> \| undefined` | Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a `ReactElement` or a function that returns the element to render. |
| `style` | No | `CSSProperties \| ((state: MenuSubmenuTriggerState) => React.CSSProperties \| undefined) \| undefined` | Style applied to the element, or a function that returns a style object based on the component's state. |
| `variants` | No | `{ readonly size?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"menu", "size"> \| undefined; readonly tone?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"menu", "tone"> \| undefined; } \| undefined` | See the usage contract and declaration. |

### ContextMenu.Portal

| Property | Required | Type | Meaning |
|---|---|---|---|
| `className` | No | `string \| ((state: MenuPortalState) => string \| undefined) \| undefined` | CSS class applied to the element, or a function that returns a class based on the component's state. |
| `container` | No | `HTMLElement \| ShadowRoot \| RefObject<HTMLElement \| ShadowRoot \| null> \| null \| undefined` | A parent element to render the portal element into. |
| `keepMounted` | No | `boolean \| undefined` | Whether to keep the portal mounted in the DOM while the popup is hidden. |
| `render` | No | `ReactElement<unknown, string \| JSXElementConstructor<any>> \| ComponentRenderFn<HTMLProps, MenuPortalState> \| undefined` | Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a `ReactElement` or a function that returns the element to render. |
| `style` | No | `CSSProperties \| ((state: MenuPortalState) => React.CSSProperties \| undefined) \| undefined` | Style applied to the element, or a function that returns a style object based on the component's state. |

### ContextMenu.Root

| Property | Required | Type | Meaning |
|---|---|---|---|
| `actionsRef` | No | `React.RefObject<MenuRootActions \| null> \| undefined` | A ref to imperative actions. - `unmount`: Manually unmounts the menu. Call this after any externally controlled closing animation finishes. - `close`: When specified, the menu can be closed imperatively. |
| `children` | No | `React.ReactNode` | See the usage contract and declaration. |
| `closeParentOnEsc` | No | `boolean \| undefined` | See the usage contract and declaration. |
| `defaultOpen` | No | `boolean \| undefined` | Whether the menu is initially open. To render a controlled menu, use the `open` prop instead. |
| `disabled` | No | `boolean \| undefined` | Whether the component should ignore user interaction. |
| `highlightItemOnHover` | No | `boolean \| undefined` | Whether moving the pointer over items should highlight them. Disabling this prop allows CSS `:hover` to be differentiated from the `:focus` (`data-highlighted`) state. |
| `loopFocus` | No | `boolean \| undefined` | Whether to loop keyboard focus back to the first item when the end of the list is reached while using the arrow keys. |
| `onOpenChange` | No | `((open: boolean, eventDetails: ContextMenuRoot.ChangeEventDetails) => void) \| undefined` | Event handler called when the menu is opened or closed. |
| `onOpenChangeComplete` | No | `((open: boolean) => void) \| undefined` | Event handler called after any animations complete when the menu is opened or closed. |
| `open` | No | `boolean \| undefined` | Whether the menu is currently open. |
| `orientation` | No | `MenuRootOrientation \| undefined` | The visual orientation of the menu. Controls whether roving focus uses up/down or left/right arrow keys. |

### ContextMenu.Trigger

| Property | Required | Type | Meaning |
|---|---|---|---|
| `className` | No | `string \| ((state: ContextMenuTriggerState) => string \| undefined) \| undefined` | CSS class applied to the element, or a function that returns a class based on the component's state. |
| `render` | No | `ReactElement<unknown, string \| JSXElementConstructor<any>> \| ComponentRenderFn<HTMLProps, ContextMenuTriggerState> \| undefined` | Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a `ReactElement` or a function that returns the element to render. |
| `style` | No | `CSSProperties \| ((state: ContextMenuTriggerState) => React.CSSProperties \| undefined) \| undefined` | Style applied to the element, or a function that returns a style object based on the component's state. |
| `variants` | No | `{ readonly size?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"context-menu", "size"> \| undefined; readonly tone?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"context-menu", "tone"> \| undefined; } \| undefined` | See the usage contract and declaration. |

## Defaults and customization

Descriptor defaults: `{"size":"md","tone":"neutral"}`. Parts: `trigger`. Explicit instance props take precedence over configured defaults.

Use semantic tokens, public part hooks and customization sheets. Keep visual configuration separate from application state.

## State, events and accessibility

For interactive controls, pair a controlled value/open prop with its corresponding change callback; default props initialize uncontrolled state. Keep application validation and submission policy explicit. Name controls with visible labels, name icon-only actions on the button, and preserve focus and dismissal behavior when replacing parts. Use native form names and submit/reset types where supported. See the usage guide for component-specific behavior and live examples.

## Declaration authority

Generated from `packages/faye-ui/dist/overlays/context-menu.d.ts` after the semantic package build. Common native/React attributes are intentionally omitted from property tables. Generic overloads, discriminated unions and complete inherited attributes remain authoritative in installed TypeScript declarations. [React DOM attributes](https://react.dev/reference/react-dom/components/common) and [Base UI component contracts](https://base-ui.com/react/overview/quick-start) describe the inherited foundations.
