ContextMenu API

API documentation for ContextMenu component

ContextMenu#

Props#

Defines valid properties in ContextMenu component.

nametypedefaultdescription
refRef<unknown>
null
The reference to the component instance.
pIfboolean
true
Whether the component should be rendered.
styleCSSProperties | ((instance?: ContextMenuInstance) => CSSProperties)
null
The style to apply to the component.
classNamestring | ((instance?: ContextMenuInstance) => string)
null
The class name to apply to the component.
asstring | number | bigint | boolean | ComponentClass<any, any> | FunctionComponent<any> | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode, any, any> | ReactPortal | Promise<AwaitedReactNode>
null
The component type to render.
asChildboolean
false
Whether the component should be rendered as a child component.
ptSafeRecord<ContextMenuPassThrough>
null
The pass-through props to pass to the component
ptOptionsPassThroughOptions
null
The pass-through options to pass to the component
unstyledboolean
null
Whether the component should be rendered without classes.
dtunknown
null
The design token to use for the component.
stylesStylesOptions<ComponentInstance>
null
The styles to use for the component.
childrenReactNode | ((instance: ContextMenuInstance) => ReactNode)
null
The children to render.
onOpenChange(event: ContextMenuChangeEvent) => void
null
Callback function that is called when the trigger is clicked.
openboolean
null
Controlled open state of the menu.
defaultOpenboolean
false
Default open state for uncontrolled mode.
appendToHTMLElement | "body" | "self"
'body'
The element to which the overlay is appended.
baseZIndexnumber
0
Base zIndex value to use in layering.
autoZIndexboolean
true
Whether to automatically manage layering.
tabIndexnumber
0
Index of the element in tabbing order.
[key: string]any
null
pt-{optionName}-*-
null
Pass through attributes for customizing component. For more info, see Pass Through tab.

State#

Defines valid state in ContextMenu component.

nametypedefaultdescription
openedboolean
null
Whether the menu is opened.
focusedboolean
null
Whether the menu is focused.
focusedOptionIdstring | string[]
null
The ID of the focused option (HTML id attribute). In composite mode, this is an array representing the focus path (e.g., ['menu_0', 'menu_0_1']). The last element is used for aria-activedescendant.
contextMenuTarget{ pageX: number; pageY: number }
null
The target position for context menu (used when triggered by right-click).

Exposes#

Defines the methods and properties exposed by ContextMenu component.

nametypedefaultdescription
stateuseMenuState
null
The state of the useMenu.
portalRefRefObject<{ containerRef: { current: { elementRef: RefObject<HTMLDivElement> } } }>
null
Reference to the portal element.
triggerRefRefObject<{ elementRef: RefObject<HTMLButtonElement> }>
null
Reference to the trigger element.
listRefRefObject<HTMLUListElement>
null
Reference to the list element.
registerItem(id: string, ref: HTMLElement) => void
null
Register an item with the menu.
unregisterItem(id: string) => void
null
Unregister an item from the menu.
onTriggerClick(event?: MouseEvent) => void
null
Handle trigger click event.
onOverlayEnter() => void
null
Handle overlay enter event.
changeVisibleState(isVisible: boolean) => void
null
Change the visible state.
onListFocus() => void
null
Handle list focus event.
onListBlur() => void
null
Handle list blur event.
onListKeyDown(event: KeyboardEvent) => void
null
Handle keyboard events on the list.
changeFocusedOptionId(id: string, level?: number) => void
null
Change the focused option ID. In composite mode, can specify level to set focus at a specific depth.
hideSubmenusAfterLevel(targetItemId: string) => void
null
Hide all submenus at or after a specific level (composite mode only).
onItemClick(event: MouseEvent) => void
null
Handle item click event.

Events#

Event fired when the contextmenu's open state changes.

nametypedescription
valuebooleanThe new value of the menu's open state.

Interfaces#

Defines passthrough(pt) options of ContextMenu component.

nametypedefaultdescription
rootMenuPassThroughType<HTMLAttributes<HTMLDivElement>>
null
Used to pass attributes to the root's DOM element.
listMenuPassThroughType<HTMLAttributes<HTMLUListElement>>
null
Used to pass attributes to the list's DOM element.
itemMenuPassThroughType<HTMLAttributes<HTMLLIElement>>
null
Used to pass attributes to the item's DOM element.
checkboxItemMenuPassThroughType<HTMLAttributes<HTMLLIElement>>
null
Used to pass attributes to the checkbox item's DOM element.
radioItemMenuPassThroughType<HTMLAttributes<HTMLLIElement>>
null
Used to pass attributes to the radio item's DOM element.
labelMenuPassThroughType<HTMLAttributes<HTMLLIElement>>
null
Used to pass attributes to the label's DOM element.
triggerMenuPassThroughType<HTMLAttributes<HTMLButtonElement>>
null
Used to pass attributes to the trigger's DOM element.
iconMenuPassThroughType<HTMLAttributes<SVGElement>>
null
Used to pass attributes to the item icon's DOM element.
checkboxIconMenuPassThroughType<HTMLAttributes<SVGElement>>
null
Used to pass attributes to the checkbox item icon's DOM element.
radioIconMenuPassThroughType<HTMLAttributes<SVGElement>>
null
Used to pass attributes to the radio item icon's DOM element.
separatorMenuPassThroughType<HTMLAttributes<HTMLLIElement>>
null
Used to pass attributes to the separator's DOM element.
portalMenuPassThroughType<HTMLAttributes<HTMLDivElement>>
null
Used to pass attributes to the portal's DOM element.

Types#

Instance of ContextMenu component.

values
ComponentInstance<ContextMenuProps, ContextMenuState, ContextMenuExposes>

ContextMenuList#

Props#

Defines valid properties in ContextMenuList component.

nametypedefaultdescription
refRef<unknown>
null
The reference to the component instance.
pIfboolean
true
Whether the component should be rendered.
styleCSSProperties | ((instance?: ContextMenuListInstance) => CSSProperties)
null
The style to apply to the component.
classNamestring | ((instance?: ContextMenuListInstance) => string)
null
The class name to apply to the component.
asstring | number | bigint | boolean | ComponentClass<any, any> | FunctionComponent<any> | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode, any, any> | ReactPortal | Promise<AwaitedReactNode>
null
The component type to render.
asChildboolean
false
Whether the component should be rendered as a child component.
ptSafeRecord<ContextMenuListPassThrough>
null
The pass-through props to pass to the component
ptOptionsPassThroughOptions
null
The pass-through options to pass to the component
unstyledboolean
null
Whether the component should be rendered without classes.
dtunknown
null
The design token to use for the component.
stylesStylesOptions<ComponentInstance>
null
The styles to use for the component.
childrenReactNode | ((instance: ContextMenuListInstance) => ReactNode)
null
The children to render.
[key: string]any
null
pt-{optionName}-*-
null
Pass through attributes for customizing component. For more info, see Pass Through tab.

Exposes#

Defines the methods and properties exposed by ContextMenuList component.

nametypedefaultdescription
contextmenuContextMenuInstance
null
The ContextMenu component instance.
menuMenuInstance
null
Instance of the Menu component.

Interfaces#

Defines passthrough(pt) options of ContextMenuList component.

nametypedefaultdescription
rootMenuListPassThroughType<HTMLAttributes<HTMLUListElement>>
null
Used to pass attributes to the root's DOM element.
contentMenuListPassThroughType<HTMLAttributes<HTMLDivElement>>
null
Used to pass attributes to the content's DOM element.

Types#

Instance of ContextMenuList component.

values
ComponentInstance<ContextMenuListProps, ContextMenuListState, ContextMenuListExposes>

ContextMenuItem#

Props#

Defines valid properties in ContextMenuItem component.

nametypedefaultdescription
refRef<unknown>
null
The reference to the component instance.
pIfboolean
true
Whether the component should be rendered.
styleCSSProperties | ((instance?: ContextMenuItemInstance) => CSSProperties)
null
The style to apply to the component.
classNamestring | ((instance?: ContextMenuItemInstance) => string)
null
The class name to apply to the component.
asstring | number | bigint | boolean | ComponentClass<any, any> | FunctionComponent<any> | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode, any, any> | ReactPortal | Promise<AwaitedReactNode>
null
The component type to render.
asChildboolean
false
Whether the component should be rendered as a child component.
ptSafeRecord<ContextMenuItemPassThrough>
null
The pass-through props to pass to the component
ptOptionsPassThroughOptions
null
The pass-through options to pass to the component
unstyledboolean
null
Whether the component should be rendered without classes.
dtunknown
null
The design token to use for the component.
stylesStylesOptions<ComponentInstance>
null
The styles to use for the component.
childrenReactNode | ((instance: ContextMenuItemInstance) => ReactNode)
null
The children to render.
disabledboolean
null
When present, it specifies that the item should be disabled.
[key: string]any
null
pt-{optionName}-*-
null
Pass through attributes for customizing component. For more info, see Pass Through tab.

Exposes#

Defines the methods and properties exposed by ContextMenuItem component.

nametypedefaultdescription
contextmenuContextMenuInstance
null
The ContextMenu component instance.
menuMenuInstance
null
Instance of the Menu component.

Interfaces#

Defines passthrough(pt) options of ContextMenuItem component.

nametypedefaultdescription
rootMenuItemPassThroughType<HTMLAttributes<HTMLLIElement>>
null
Used to pass attributes to the root's DOM element.

Types#

Instance of ContextMenuItem component.

values
ComponentInstance<ContextMenuItemProps, ContextMenuItemState, ContextMenuItemExposes>

ContextMenuLabel#

Props#

Defines valid properties in ContextMenuLabel component.

nametypedefaultdescription
refRef<unknown>
null
The reference to the component instance.
pIfboolean
true
Whether the component should be rendered.
styleCSSProperties | ((instance?: ContextMenuLabelInstance) => CSSProperties)
null
The style to apply to the component.
classNamestring | ((instance?: ContextMenuLabelInstance) => string)
null
The class name to apply to the component.
asstring | number | bigint | boolean | ComponentClass<any, any> | FunctionComponent<any> | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode, any, any> | ReactPortal | Promise<AwaitedReactNode>
null
The component type to render.
asChildboolean
false
Whether the component should be rendered as a child component.
ptSafeRecord<ContextMenuLabelPassThrough>
null
The pass-through props to pass to the component
ptOptionsPassThroughOptions
null
The pass-through options to pass to the component
unstyledboolean
null
Whether the component should be rendered without classes.
dtunknown
null
The design token to use for the component.
stylesStylesOptions<ComponentInstance>
null
The styles to use for the component.
childrenReactNode | ((instance: ContextMenuLabelInstance) => ReactNode)
null
The children to render.
[key: string]any
null
pt-{optionName}-*-
null
Pass through attributes for customizing component. For more info, see Pass Through tab.

Exposes#

Defines the methods and properties exposed by ContextMenuLabel component.

nametypedefaultdescription
contextmenuContextMenuInstance
null
The ContextMenu component instance.
menuMenuInstance
null
Instance of the Menu component.

Interfaces#

Defines passthrough(pt) options of ContextMenuLabel component.

nametypedefaultdescription
rootMenuLabelPassThroughType<HTMLAttributes<HTMLLIElement>>
null
Used to pass attributes to the root's DOM element.

Types#

Instance of ContextMenuLabel component.

values
ComponentInstance<ContextMenuLabelProps, ContextMenuLabelState, ContextMenuLabelExposes>

ContextMenuSub#

Props#

Defines valid properties in ContextMenuSub component.

nametypedefaultdescription
refRef<unknown>
null
The reference to the component instance.
pIfboolean
true
Whether the component should be rendered.
styleCSSProperties | ((instance?: ContextMenuSubInstance) => CSSProperties)
null
The style to apply to the component.
classNamestring | ((instance?: ContextMenuSubInstance) => string)
null
The class name to apply to the component.
asstring | number | bigint | boolean | ComponentClass<any, any> | FunctionComponent<any> | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode, any, any> | ReactPortal | Promise<AwaitedReactNode>
null
The component type to render.
asChildboolean
false
Whether the component should be rendered as a child component.
ptSafeRecord<ContextMenuSubPassThrough>
null
The pass-through props to pass to the component
ptOptionsPassThroughOptions
null
The pass-through options to pass to the component
unstyledboolean
null
Whether the component should be rendered without classes.
dtunknown
null
The design token to use for the component.
stylesStylesOptions<ComponentInstance>
null
The styles to use for the component.
childrenReactNode | ((instance: ContextMenuSubInstance) => ReactNode)
null
The children to render.
[key: string]any
null
pt-{optionName}-*-
null
Pass through attributes for customizing component. For more info, see Pass Through tab.

State#

Exposes#

Defines the methods and properties exposed by ContextMenuSub component.

nametypedefaultdescription
contextmenuContextMenuInstance
null
The ContextMenu component instance.
menuMenuInstance
null
Instance of the Menu component.

Events#

Interfaces#

Defines passthrough(pt) options of ContextMenuSub component.

nametypedefaultdescription
rootMenuSubPassThroughType<HTMLAttributes<HTMLLIElement>>
null
Used to pass attributes to the root's DOM element.

Types#

Instance of ContextMenuSub component.

values
ComponentInstance<ContextMenuSubProps, ContextMenuSubState, ContextMenuSubExposes>

ContextMenuSeparator#

Props#

Defines valid properties in ContextMenuSeparator component.

nametypedefaultdescription
refRef<unknown>
null
The reference to the component instance.
pIfboolean
true
Whether the component should be rendered.
styleCSSProperties | ((instance?: ContextMenuSeparatorInstance) => CSSProperties)
null
The style to apply to the component.
classNamestring | ((instance?: ContextMenuSeparatorInstance) => string)
null
The class name to apply to the component.
asstring | number | bigint | boolean | ComponentClass<any, any> | FunctionComponent<any> | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode, any, any> | ReactPortal | Promise<AwaitedReactNode>
null
The component type to render.
asChildboolean
false
Whether the component should be rendered as a child component.
ptSafeRecord<ContextMenuSeparatorPassThrough>
null
The pass-through props to pass to the component
ptOptionsPassThroughOptions
null
The pass-through options to pass to the component
unstyledboolean
null
Whether the component should be rendered without classes.
dtunknown
null
The design token to use for the component.
stylesStylesOptions<ComponentInstance>
null
The styles to use for the component.
childrenReactNode | ((instance: ContextMenuSeparatorInstance) => ReactNode)
null
The children to render.
[key: string]any
null
pt-{optionName}-*-
null
Pass through attributes for customizing component. For more info, see Pass Through tab.

Exposes#

Defines the methods and properties exposed by ContextMenuSeparator component.

nametypedefaultdescription
contextmenuContextMenuInstance
null
The ContextMenu component instance.
menuMenuInstance
null
Instance of the Menu component.

Interfaces#

Defines passthrough(pt) options of ContextMenuSeparator component.

nametypedefaultdescription
rootMenuSeparatorPassThroughType<HTMLAttributes<HTMLLIElement>>
null
Used to pass attributes to the root's DOM element.

Types#

Instance of ContextMenuSeparator component.

values
ComponentInstance<ContextMenuSeparatorProps, ContextMenuSeparatorState, ContextMenuSeparatorExposes>

ContextMenuTrigger#

Props#

Defines valid properties in ContextMenuTrigger component.

nametypedefaultdescription
refRef<unknown>
null
The reference to the component instance.
pIfboolean
true
Whether the component should be rendered.
styleCSSProperties | ((instance?: ContextMenuTriggerInstance) => CSSProperties)
null
The style to apply to the component.
classNamestring | ((instance?: ContextMenuTriggerInstance) => string)
null
The class name to apply to the component.
asstring | number | bigint | boolean | ComponentClass<any, any> | FunctionComponent<any> | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode, any, any> | ReactPortal | Promise<AwaitedReactNode>
null
The component type to render.
asChildboolean
false
Whether the component should be rendered as a child component.
ptSafeRecord<ContextMenuTriggerPassThrough>
null
The pass-through props to pass to the component
ptOptionsPassThroughOptions
null
The pass-through options to pass to the component
unstyledboolean
null
Whether the component should be rendered without classes.
dtunknown
null
The design token to use for the component.
stylesStylesOptions<ComponentInstance>
null
The styles to use for the component.
childrenReactNode | ((instance: ContextMenuTriggerInstance) => ReactNode)
null
The children to render.
[key: string]any
null
pt-{optionName}-*-
null
Pass through attributes for customizing component. For more info, see Pass Through tab.

Exposes#

Defines the methods and properties exposed by ContextMenuTrigger component.

nametypedefaultdescription
contextmenuContextMenuInstance
null
The ContextMenu component instance.
menuMenuInstance
null
Instance of the Menu component.

Interfaces#

Defines passthrough(pt) options of ContextMenuTrigger component.

nametypedefaultdescription
rootContextMenuTriggerPassThroughType<HTMLAttributes<HTMLDivElement>>
null
Used to pass attributes to the root's DOM element.

Types#

Instance of ContextMenuTrigger component.

values
ComponentInstance<ContextMenuTriggerProps, ContextMenuTriggerState, ContextMenuTriggerExposes>

ContextMenuPortal#

Props#

Defines valid properties in ContextMenuPortal component.

nametypedefaultdescription
refRef<unknown>
null
The reference to the component instance.
pIfboolean
true
Whether the component should be rendered.
styleCSSProperties | ((instance?: ContextMenuPortalInstance) => CSSProperties)
null
The style to apply to the component.
classNamestring | ((instance?: ContextMenuPortalInstance) => string)
null
The class name to apply to the component.
asstring | number | bigint | boolean | ComponentClass<any, any> | FunctionComponent<any> | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode, any, any> | ReactPortal | Promise<AwaitedReactNode>
null
The component type to render.
asChildboolean
false
Whether the component should be rendered as a child component.
ptSafeRecord<ContextMenuPortalPassThrough>
null
The pass-through props to pass to the component
ptOptionsPassThroughOptions
null
The pass-through options to pass to the component
unstyledboolean
null
Whether the component should be rendered without classes.
dtunknown
null
The design token to use for the component.
stylesStylesOptions<ComponentInstance>
null
The styles to use for the component.
childrenReactNode | ((instance: ContextMenuPortalInstance) => ReactNode)
null
The children to render.
[key: string]any
null
pt-{optionName}-*-
null
Pass through attributes for customizing component. For more info, see Pass Through tab.

Exposes#

Defines the methods and properties exposed by ContextMenuPortal component.

nametypedefaultdescription
contextmenuContextMenuInstance
null
The ContextMenu component instance.
menuMenuInstance
null
Instance of the Menu component.

Interfaces#

Defines passthrough(pt) options of ContextMenuPortal component.

nametypedefaultdescription
rootMenuPortalPassThroughType<HTMLAttributes<HTMLDivElement>>
null
Used to pass attributes to the root's DOM element.

ContextMenuIcon#

Props#

Defines valid properties in ContextMenuIcon component.

nametypedefaultdescription
refRef<unknown>
null
The reference to the component instance.
pIfboolean
true
Whether the component should be rendered.
styleCSSProperties | ((instance?: ContextMenuIconInstance) => CSSProperties)
null
The style to apply to the component.
classNamestring | ((instance?: ContextMenuIconInstance) => string)
null
The class name to apply to the component.
asstring | number | bigint | boolean | ComponentClass<any, any> | FunctionComponent<any> | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode, any, any> | ReactPortal | Promise<AwaitedReactNode>
null
The component type to render.
asChildboolean
false
Whether the component should be rendered as a child component.
ptSafeRecord<ContextMenuIconPassThrough>
null
The pass-through props to pass to the component
ptOptionsPassThroughOptions
null
The pass-through options to pass to the component
unstyledboolean
null
Whether the component should be rendered without classes.
dtunknown
null
The design token to use for the component.
stylesStylesOptions<ComponentInstance>
null
The styles to use for the component.
childrenReactNode | ((instance: ContextMenuIconInstance) => ReactNode)
null
The children to render.
[key: string]any
null
pt-{optionName}-*-
null
Pass through attributes for customizing component. For more info, see Pass Through tab.

Exposes#

Defines the methods and properties exposed by ContextMenuIcon component.

nametypedefaultdescription
contextmenuContextMenuInstance
null
The ContextMenu component instance.
menuMenuInstance
null
Instance of the Menu component.

Interfaces#

Defines passthrough(pt) options of ContextMenuIcon component.

nametypedefaultdescription
rootMenuIconPassThroughType<SVGAttributes<SVGElement>>
null
Used to pass attributes to the root's DOM element.

Types#

Instance of ContextMenuIcon component.

values
ComponentInstance<ContextMenuIconProps, ContextMenuIconState, ContextMenuIconExposes>

Props#

Defines valid properties in MenuCheckboxGroup component.

nametypedefaultdescription
refRef<unknown>
null
The reference to the component instance.
pIfboolean
true
Whether the component should be rendered.
styleCSSProperties | ((instance?: MenuCheckboxGroupInstance) => CSSProperties)
null
The style to apply to the component.
classNamestring | ((instance?: MenuCheckboxGroupInstance) => string)
null
The class name to apply to the component.
asstring | number | bigint | boolean | ComponentClass<any, any> | FunctionComponent<any> | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode, any, any> | ReactPortal | Promise<AwaitedReactNode>
null
The component type to render.
asChildboolean
false
Whether the component should be rendered as a child component.
ptSafeRecord<MenuCheckboxGroupPassThrough>
null
The pass-through props to pass to the component
ptOptionsPassThroughOptions
null
The pass-through options to pass to the component
unstyledboolean
null
Whether the component should be rendered without classes.
dtunknown
null
The design token to use for the component.
stylesStylesOptions<ComponentInstance>
null
The styles to use for the component.
childrenReactNode | ((instance: MenuCheckboxGroupInstance) => ReactNode)
null
The children to render.
valueunknown[]
null
Values of the selected checkbox items.
defaultValueunknown[]
null
Default values of the selected checkbox items.
onValueChange(event: MenuCheckboxGroupValueChangeEvent) => void
null
Callback to invoke when value changes.
[key: string]any
null

Exposes#

Defines the methods and properties exposed by MenuCheckboxGroup component.

nametypedefaultdescription
contextMenuCheckboxGroupContextInterface
null
Context value for the checkbox group containing the current selection state, change handler, and optional group name.

Types#

Instance of MenuCheckboxGroup component.

values
ComponentInstance<MenuCheckboxGroupProps, MenuCheckboxGroupState, MenuCheckboxGroupExposes>

ContextMenuCheckboxItem#

Props#

Defines valid properties in ContextMenuCheckboxItem component.

nametypedefaultdescription
refRef<unknown>
null
The reference to the component instance.
pIfboolean
true
Whether the component should be rendered.
styleCSSProperties | ((instance?: ContextMenuCheckboxItemInstance) => CSSProperties)
null
The style to apply to the component.
classNamestring | ((instance?: ContextMenuCheckboxItemInstance) => string)
null
The class name to apply to the component.
asstring | number | bigint | boolean | ComponentClass<any, any> | FunctionComponent<any> | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode, any, any> | ReactPortal | Promise<AwaitedReactNode>
null
The component type to render.
asChildboolean
false
Whether the component should be rendered as a child component.
ptSafeRecord<ContextMenuCheckboxItemPassThrough>
null
The pass-through props to pass to the component
ptOptionsPassThroughOptions
null
The pass-through options to pass to the component
unstyledboolean
null
Whether the component should be rendered without classes.
dtunknown
null
The design token to use for the component.
stylesStylesOptions<ComponentInstance>
null
The styles to use for the component.
childrenReactNode | ((instance: ContextMenuCheckboxItemInstance) => ReactNode)
null
The children to render.
disabledboolean
null
When present, it specifies that the item should be disabled.
onCheckedChange(event: ContextMenuCheckboxItemCheckedChangeEvent) => void
null
Callback to invoke when checked state changes.
[key: string]unknown
null
pt-{optionName}-*-
null
Pass through attributes for customizing component. For more info, see Pass Through tab.

Exposes#

Defines the methods and properties exposed by ContextMenuCheckboxItem component.

nametypedefaultdescription
contextmenuContextMenuInstance
null
The ContextMenu component instance.
menuMenuInstance
null
Instance of the Menu component.

Interfaces#

Defines passthrough(pt) options of ContextMenuCheckboxItem component.

nametypedefaultdescription
rootMenuCheckboxItemPassThroughType<HTMLAttributes<HTMLLIElement>>
null
Used to pass attributes to the root's DOM element.

Types#

Instance of ContextMenuCheckboxItem component.

values
ComponentInstance<ContextMenuCheckboxItemProps, ContextMenuCheckboxItemState, ContextMenuCheckboxItemExposes>

ContextMenuRadioGroup#

Props#

Defines valid properties in ContextMenuRadioGroup component.

nametypedefaultdescription
refRef<unknown>
null
The reference to the component instance.
pIfboolean
true
Whether the component should be rendered.
styleCSSProperties | ((instance?: ContextMenuRadioGroupInstance) => CSSProperties)
null
The style to apply to the component.
classNamestring | ((instance?: ContextMenuRadioGroupInstance) => string)
null
The class name to apply to the component.
asstring | number | bigint | boolean | ComponentClass<any, any> | FunctionComponent<any> | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode, any, any> | ReactPortal | Promise<AwaitedReactNode>
null
The component type to render.
asChildboolean
false
Whether the component should be rendered as a child component.
ptSafeRecord<ContextMenuRadioGroupPassThrough>
null
The pass-through props to pass to the component
ptOptionsPassThroughOptions
null
The pass-through options to pass to the component
unstyledboolean
null
Whether the component should be rendered without classes.
dtunknown
null
The design token to use for the component.
stylesStylesOptions<ComponentInstance>
null
The styles to use for the component.
childrenReactNode | ((instance: ContextMenuRadioGroupInstance) => ReactNode)
null
The children to render.
onValueChange(event: ContextMenuRadioGroupValueChangeEvent) => void
null
Callback to invoke when value changes.
[key: string]unknown
null

Exposes#

Defines the methods and properties exposed by ContextMenuRadioGroup component.

nametypedefaultdescription
contextmenuContextMenuInstance
null
The ContextMenu component instance.
menuMenuInstance
null
Instance of the Menu component.

Types#

Instance of ContextMenuRadioGroup component.

values
ComponentInstance<ContextMenuRadioGroupProps, ContextMenuRadioGroupState, ContextMenuRadioGroupExposes>

ContextMenuRadioItem#

Props#

Defines valid properties in ContextMenuRadioItem component.

nametypedefaultdescription
refRef<unknown>
null
The reference to the component instance.
pIfboolean
true
Whether the component should be rendered.
styleCSSProperties | ((instance?: ContextMenuRadioItemInstance) => CSSProperties)
null
The style to apply to the component.
classNamestring | ((instance?: ContextMenuRadioItemInstance) => string)
null
The class name to apply to the component.
asstring | number | bigint | boolean | ComponentClass<any, any> | FunctionComponent<any> | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode, any, any> | ReactPortal | Promise<AwaitedReactNode>
null
The component type to render.
asChildboolean
false
Whether the component should be rendered as a child component.
ptSafeRecord<ContextMenuRadioItemPassThrough>
null
The pass-through props to pass to the component
ptOptionsPassThroughOptions
null
The pass-through options to pass to the component
unstyledboolean
null
Whether the component should be rendered without classes.
dtunknown
null
The design token to use for the component.
stylesStylesOptions<ComponentInstance>
null
The styles to use for the component.
childrenReactNode | ((instance: ContextMenuRadioItemInstance) => ReactNode)
null
The children to render.
disabledboolean
null
When present, it specifies that the item should be disabled.
[key: string]any
null
pt-{optionName}-*-
null
Pass through attributes for customizing component. For more info, see Pass Through tab.

State#

Exposes#

Defines the methods and properties exposed by ContextMenuRadioItem component.

nametypedefaultdescription
contextmenuContextMenuInstance
null
The ContextMenu component instance.
menuMenuInstance
null
Instance of the Menu component.

Events#

Interfaces#

Defines passthrough(pt) options of ContextMenuRadioItem component.

nametypedefaultdescription
rootMenuRadioItemPassThroughType<HTMLAttributes<HTMLLIElement>>
null
Used to pass attributes to the root's DOM element.

Types#

Instance of ContextMenuRadioItem component.

values
ComponentInstance<ContextMenuRadioItemProps, ContextMenuRadioItemState, ContextMenuRadioItemExposes>

ContextMenuCheckboxIcon#

Props#

Defines valid properties in ContextMenuCheckboxIcon component.

nametypedefaultdescription
refRef<unknown>
null
The reference to the component instance.
pIfboolean
true
Whether the component should be rendered.
styleCSSProperties | ((instance?: ContextMenuCheckboxIconInstance) => CSSProperties)
null
The style to apply to the component.
classNamestring | ((instance?: ContextMenuCheckboxIconInstance) => string)
null
The class name to apply to the component.
asstring | number | bigint | boolean | ComponentClass<any, any> | FunctionComponent<any> | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode, any, any> | ReactPortal | Promise<AwaitedReactNode>
null
The component type to render.
asChildboolean
false
Whether the component should be rendered as a child component.
ptSafeRecord<ContextMenuCheckboxIconPassThrough>
null
The pass-through props to pass to the component
ptOptionsPassThroughOptions
null
The pass-through options to pass to the component
unstyledboolean
null
Whether the component should be rendered without classes.
dtunknown
null
The design token to use for the component.
stylesStylesOptions<ComponentInstance>
null
The styles to use for the component.
childrenReactNode | ((instance: ContextMenuCheckboxIconInstance) => ReactNode)
null
The children to render.
[key: string]any
null
pt-{optionName}-*-
null
Pass through attributes for customizing component. For more info, see Pass Through tab.

Exposes#

Defines the methods and properties exposed by ContextMenuCheckboxIcon component.

nametypedefaultdescription
contextmenuContextMenuInstance
null
The ContextMenu component instance.
menuMenuInstance
null
Instance of the Menu component.

Interfaces#

Defines passthrough(pt) options of ContextMenuCheckboxIcon component.

nametypedefaultdescription
rootMenuCheckboxIconPassThroughType<SVGAttributes<SVGElement>>
null
Used to pass attributes to the root's DOM element.

Types#

Instance of ContextMenuCheckboxIcon component.

values
ComponentInstance<ContextMenuCheckboxIconProps, ContextMenuCheckboxIconState, ContextMenuCheckboxIconExposes>

ContextMenuRadioIcon#

Props#

Defines valid properties in ContextMenuRadioIcon component.

nametypedefaultdescription
refRef<unknown>
null
The reference to the component instance.
pIfboolean
true
Whether the component should be rendered.
styleCSSProperties | ((instance?: ContextMenuRadioIconInstance) => CSSProperties)
null
The style to apply to the component.
classNamestring | ((instance?: ContextMenuRadioIconInstance) => string)
null
The class name to apply to the component.
asstring | number | bigint | boolean | ComponentClass<any, any> | FunctionComponent<any> | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode, any, any> | ReactPortal | Promise<AwaitedReactNode>
null
The component type to render.
asChildboolean
false
Whether the component should be rendered as a child component.
ptSafeRecord<ContextMenuRadioIconPassThrough>
null
The pass-through props to pass to the component
ptOptionsPassThroughOptions
null
The pass-through options to pass to the component
unstyledboolean
null
Whether the component should be rendered without classes.
dtunknown
null
The design token to use for the component.
stylesStylesOptions<ComponentInstance>
null
The styles to use for the component.
childrenReactNode | ((instance: ContextMenuRadioIconInstance) => ReactNode)
null
The children to render.
[key: string]any
null
pt-{optionName}-*-
null
Pass through attributes for customizing component. For more info, see Pass Through tab.

Exposes#

Defines the methods and properties exposed by ContextMenuRadioIcon component.

nametypedefaultdescription
contextmenuContextMenuInstance
null
The ContextMenu component instance.
menuMenuInstance
null
Instance of the Menu component.

Interfaces#

Defines passthrough(pt) options of ContextMenuRadioIcon component.

nametypedefaultdescription
rootMenuRadioIconPassThroughType<SVGAttributes<SVGElement>>
null
Used to pass attributes to the root's DOM element.

Types#

Instance of ContextMenuRadioIcon component.

values
ComponentInstance<ContextMenuRadioIconProps, ContextMenuRadioIconState, ContextMenuRadioIconExposes>

useContextMenu#

Types#

Instance of useContextMenu headless.

values
HeadlessInstance<useContextMenuProps, useContextMenuState, useContextMenuExposes>