ContextMenu API
API documentation for ContextMenu component
Props#
Defines valid properties in ContextMenu component.
| name | type | default | description |
|---|
| ref | Ref<unknown> | null | The reference to the component instance. |
| pIf | boolean | true | Whether the component should be rendered. |
| style | CSSProperties | ((instance?: ContextMenuInstance) => CSSProperties) | null | The style to apply to the component. |
| className | string | ((instance?: ContextMenuInstance) => string) | null | The class name to apply to the component. |
| as | string | 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. |
| asChild | boolean | false | Whether the component should be rendered as a child component. |
| pt | SafeRecord<ContextMenuPassThrough> | null | The pass-through props to pass to the component |
| ptOptions | PassThroughOptions | null | The pass-through options to pass to the component |
| unstyled | boolean | null | Whether the component should be rendered without classes. |
| dt | unknown | null | The design token to use for the component. |
| styles | StylesOptions<ComponentInstance> | null | The styles to use for the component. |
| children | ReactNode | ((instance: ContextMenuInstance) => ReactNode) | null | The children to render. |
| onOpenChange | (event: ContextMenuChangeEvent) => void | null | Callback function that is called when the trigger is clicked. |
| open | boolean | null | Controlled open state of the menu. |
| defaultOpen | boolean | false | Default open state for uncontrolled mode. |
| appendTo | HTMLElement | "body" | "self" | 'body' | The element to which the overlay is appended. |
| baseZIndex | number | 0 | Base zIndex value to use in layering. |
| autoZIndex | boolean | true | Whether to automatically manage layering. |
| tabIndex | number | 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.
| name | type | default | description |
|---|
| opened | boolean | null | Whether the menu is opened. |
| focused | boolean | null | Whether the menu is focused. |
| focusedOptionId | string | 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.
| name | type | default | description |
|---|
| state | useMenuState | null | The state of the useMenu. |
| portalRef | RefObject<{ containerRef: { current: { elementRef: RefObject<HTMLDivElement> } } }> | null | Reference to the portal element. |
| triggerRef | RefObject<{ elementRef: RefObject<HTMLButtonElement> }> | null | Reference to the trigger element. |
| listRef | RefObject<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.
| name | type | description |
|---|
| value | boolean | The new value of the menu's open state. |
Interfaces#
PassThroughOptions
Defines passthrough(pt) options of ContextMenu component.
| name | type | default | description |
|---|
| root | MenuPassThroughType<HTMLAttributes<HTMLDivElement>> | null | Used to pass attributes to the root's DOM element. |
| list | MenuPassThroughType<HTMLAttributes<HTMLUListElement>> | null | Used to pass attributes to the list's DOM element. |
| item | MenuPassThroughType<HTMLAttributes<HTMLLIElement>> | null | Used to pass attributes to the item's DOM element. |
| checkboxItem | MenuPassThroughType<HTMLAttributes<HTMLLIElement>> | null | Used to pass attributes to the checkbox item's DOM element. |
| radioItem | MenuPassThroughType<HTMLAttributes<HTMLLIElement>> | null | Used to pass attributes to the radio item's DOM element. |
| label | MenuPassThroughType<HTMLAttributes<HTMLLIElement>> | null | Used to pass attributes to the label's DOM element. |
| trigger | MenuPassThroughType<HTMLAttributes<HTMLButtonElement>> | null | Used to pass attributes to the trigger's DOM element. |
| icon | MenuPassThroughType<HTMLAttributes<SVGElement>> | null | Used to pass attributes to the item icon's DOM element. |
| checkboxIcon | MenuPassThroughType<HTMLAttributes<SVGElement>> | null | Used to pass attributes to the checkbox item icon's DOM element. |
| radioIcon | MenuPassThroughType<HTMLAttributes<SVGElement>> | null | Used to pass attributes to the radio item icon's DOM element. |
| separator | MenuPassThroughType<HTMLAttributes<HTMLLIElement>> | null | Used to pass attributes to the separator's DOM element. |
| portal | MenuPassThroughType<HTMLAttributes<HTMLDivElement>> | null | Used to pass attributes to the portal's DOM element. |
Types#
Instance
Instance of ContextMenu component.
| values |
|---|
| ComponentInstance<ContextMenuProps, ContextMenuState, ContextMenuExposes> |
Props#
Defines valid properties in ContextMenuList component.
| name | type | default | description |
|---|
| ref | Ref<unknown> | null | The reference to the component instance. |
| pIf | boolean | true | Whether the component should be rendered. |
| style | CSSProperties | ((instance?: ContextMenuListInstance) => CSSProperties) | null | The style to apply to the component. |
| className | string | ((instance?: ContextMenuListInstance) => string) | null | The class name to apply to the component. |
| as | string | 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. |
| asChild | boolean | false | Whether the component should be rendered as a child component. |
| pt | SafeRecord<ContextMenuListPassThrough> | null | The pass-through props to pass to the component |
| ptOptions | PassThroughOptions | null | The pass-through options to pass to the component |
| unstyled | boolean | null | Whether the component should be rendered without classes. |
| dt | unknown | null | The design token to use for the component. |
| styles | StylesOptions<ComponentInstance> | null | The styles to use for the component. |
| children | ReactNode | ((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.
| name | type | default | description |
|---|
| contextmenu | ContextMenuInstance | null | The ContextMenu component instance. |
| menu | MenuInstance | null | Instance of the Menu component. |
Interfaces#
PassThroughOptions
Defines passthrough(pt) options of ContextMenuList component.
| name | type | default | description |
|---|
| root | MenuListPassThroughType<HTMLAttributes<HTMLUListElement>> | null | Used to pass attributes to the root's DOM element. |
| content | MenuListPassThroughType<HTMLAttributes<HTMLDivElement>> | null | Used to pass attributes to the content's DOM element. |
Types#
Instance
Instance of ContextMenuList component.
| values |
|---|
| ComponentInstance<ContextMenuListProps, ContextMenuListState, ContextMenuListExposes> |
Props#
Defines valid properties in ContextMenuItem component.
| name | type | default | description |
|---|
| ref | Ref<unknown> | null | The reference to the component instance. |
| pIf | boolean | true | Whether the component should be rendered. |
| style | CSSProperties | ((instance?: ContextMenuItemInstance) => CSSProperties) | null | The style to apply to the component. |
| className | string | ((instance?: ContextMenuItemInstance) => string) | null | The class name to apply to the component. |
| as | string | 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. |
| asChild | boolean | false | Whether the component should be rendered as a child component. |
| pt | SafeRecord<ContextMenuItemPassThrough> | null | The pass-through props to pass to the component |
| ptOptions | PassThroughOptions | null | The pass-through options to pass to the component |
| unstyled | boolean | null | Whether the component should be rendered without classes. |
| dt | unknown | null | The design token to use for the component. |
| styles | StylesOptions<ComponentInstance> | null | The styles to use for the component. |
| children | ReactNode | ((instance: ContextMenuItemInstance) => ReactNode) | null | The children to render. |
| disabled | boolean | 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.
| name | type | default | description |
|---|
| contextmenu | ContextMenuInstance | null | The ContextMenu component instance. |
| menu | MenuInstance | null | Instance of the Menu component. |
Interfaces#
PassThroughOptions
Defines passthrough(pt) options of ContextMenuItem component.
| name | type | default | description |
|---|
| root | MenuItemPassThroughType<HTMLAttributes<HTMLLIElement>> | null | Used to pass attributes to the root's DOM element. |
Types#
Instance
Instance of ContextMenuItem component.
| values |
|---|
| ComponentInstance<ContextMenuItemProps, ContextMenuItemState, ContextMenuItemExposes> |
Props#
Defines valid properties in ContextMenuLabel component.
| name | type | default | description |
|---|
| ref | Ref<unknown> | null | The reference to the component instance. |
| pIf | boolean | true | Whether the component should be rendered. |
| style | CSSProperties | ((instance?: ContextMenuLabelInstance) => CSSProperties) | null | The style to apply to the component. |
| className | string | ((instance?: ContextMenuLabelInstance) => string) | null | The class name to apply to the component. |
| as | string | 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. |
| asChild | boolean | false | Whether the component should be rendered as a child component. |
| pt | SafeRecord<ContextMenuLabelPassThrough> | null | The pass-through props to pass to the component |
| ptOptions | PassThroughOptions | null | The pass-through options to pass to the component |
| unstyled | boolean | null | Whether the component should be rendered without classes. |
| dt | unknown | null | The design token to use for the component. |
| styles | StylesOptions<ComponentInstance> | null | The styles to use for the component. |
| children | ReactNode | ((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.
| name | type | default | description |
|---|
| contextmenu | ContextMenuInstance | null | The ContextMenu component instance. |
| menu | MenuInstance | null | Instance of the Menu component. |
Interfaces#
PassThroughOptions
Defines passthrough(pt) options of ContextMenuLabel component.
| name | type | default | description |
|---|
| root | MenuLabelPassThroughType<HTMLAttributes<HTMLLIElement>> | null | Used to pass attributes to the root's DOM element. |
Types#
Instance
Instance of ContextMenuLabel component.
| values |
|---|
| ComponentInstance<ContextMenuLabelProps, ContextMenuLabelState, ContextMenuLabelExposes> |
Props#
Defines valid properties in ContextMenuSub component.
| name | type | default | description |
|---|
| ref | Ref<unknown> | null | The reference to the component instance. |
| pIf | boolean | true | Whether the component should be rendered. |
| style | CSSProperties | ((instance?: ContextMenuSubInstance) => CSSProperties) | null | The style to apply to the component. |
| className | string | ((instance?: ContextMenuSubInstance) => string) | null | The class name to apply to the component. |
| as | string | 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. |
| asChild | boolean | false | Whether the component should be rendered as a child component. |
| pt | SafeRecord<ContextMenuSubPassThrough> | null | The pass-through props to pass to the component |
| ptOptions | PassThroughOptions | null | The pass-through options to pass to the component |
| unstyled | boolean | null | Whether the component should be rendered without classes. |
| dt | unknown | null | The design token to use for the component. |
| styles | StylesOptions<ComponentInstance> | null | The styles to use for the component. |
| children | ReactNode | ((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.
| name | type | default | description |
|---|
| contextmenu | ContextMenuInstance | null | The ContextMenu component instance. |
| menu | MenuInstance | null | Instance of the Menu component. |
Events#
Interfaces#
PassThroughOptions
Defines passthrough(pt) options of ContextMenuSub component.
| name | type | default | description |
|---|
| root | MenuSubPassThroughType<HTMLAttributes<HTMLLIElement>> | null | Used to pass attributes to the root's DOM element. |
Types#
Instance
Instance of ContextMenuSub component.
| values |
|---|
| ComponentInstance<ContextMenuSubProps, ContextMenuSubState, ContextMenuSubExposes> |
Props#
Defines valid properties in ContextMenuSeparator component.
| name | type | default | description |
|---|
| ref | Ref<unknown> | null | The reference to the component instance. |
| pIf | boolean | true | Whether the component should be rendered. |
| style | CSSProperties | ((instance?: ContextMenuSeparatorInstance) => CSSProperties) | null | The style to apply to the component. |
| className | string | ((instance?: ContextMenuSeparatorInstance) => string) | null | The class name to apply to the component. |
| as | string | 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. |
| asChild | boolean | false | Whether the component should be rendered as a child component. |
| pt | SafeRecord<ContextMenuSeparatorPassThrough> | null | The pass-through props to pass to the component |
| ptOptions | PassThroughOptions | null | The pass-through options to pass to the component |
| unstyled | boolean | null | Whether the component should be rendered without classes. |
| dt | unknown | null | The design token to use for the component. |
| styles | StylesOptions<ComponentInstance> | null | The styles to use for the component. |
| children | ReactNode | ((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.
| name | type | default | description |
|---|
| contextmenu | ContextMenuInstance | null | The ContextMenu component instance. |
| menu | MenuInstance | null | Instance of the Menu component. |
Interfaces#
PassThroughOptions
Defines passthrough(pt) options of ContextMenuSeparator component.
| name | type | default | description |
|---|
| root | MenuSeparatorPassThroughType<HTMLAttributes<HTMLLIElement>> | null | Used to pass attributes to the root's DOM element. |
Types#
Instance
Instance of ContextMenuSeparator component.
| values |
|---|
| ComponentInstance<ContextMenuSeparatorProps, ContextMenuSeparatorState, ContextMenuSeparatorExposes> |
Props#
Defines valid properties in ContextMenuTrigger component.
| name | type | default | description |
|---|
| ref | Ref<unknown> | null | The reference to the component instance. |
| pIf | boolean | true | Whether the component should be rendered. |
| style | CSSProperties | ((instance?: ContextMenuTriggerInstance) => CSSProperties) | null | The style to apply to the component. |
| className | string | ((instance?: ContextMenuTriggerInstance) => string) | null | The class name to apply to the component. |
| as | string | 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. |
| asChild | boolean | false | Whether the component should be rendered as a child component. |
| pt | SafeRecord<ContextMenuTriggerPassThrough> | null | The pass-through props to pass to the component |
| ptOptions | PassThroughOptions | null | The pass-through options to pass to the component |
| unstyled | boolean | null | Whether the component should be rendered without classes. |
| dt | unknown | null | The design token to use for the component. |
| styles | StylesOptions<ComponentInstance> | null | The styles to use for the component. |
| children | ReactNode | ((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.
| name | type | default | description |
|---|
| contextmenu | ContextMenuInstance | null | The ContextMenu component instance. |
| menu | MenuInstance | null | Instance of the Menu component. |
Interfaces#
PassThroughOptions
Defines passthrough(pt) options of ContextMenuTrigger component.
| name | type | default | description |
|---|
| root | ContextMenuTriggerPassThroughType<HTMLAttributes<HTMLDivElement>> | null | Used to pass attributes to the root's DOM element. |
Types#
Instance
Instance of ContextMenuTrigger component.
| values |
|---|
| ComponentInstance<ContextMenuTriggerProps, ContextMenuTriggerState, ContextMenuTriggerExposes> |
Props#
Defines valid properties in ContextMenuPortal component.
| name | type | default | description |
|---|
| ref | Ref<unknown> | null | The reference to the component instance. |
| pIf | boolean | true | Whether the component should be rendered. |
| style | CSSProperties | ((instance?: ContextMenuPortalInstance) => CSSProperties) | null | The style to apply to the component. |
| className | string | ((instance?: ContextMenuPortalInstance) => string) | null | The class name to apply to the component. |
| as | string | 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. |
| asChild | boolean | false | Whether the component should be rendered as a child component. |
| pt | SafeRecord<ContextMenuPortalPassThrough> | null | The pass-through props to pass to the component |
| ptOptions | PassThroughOptions | null | The pass-through options to pass to the component |
| unstyled | boolean | null | Whether the component should be rendered without classes. |
| dt | unknown | null | The design token to use for the component. |
| styles | StylesOptions<ComponentInstance> | null | The styles to use for the component. |
| children | ReactNode | ((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.
| name | type | default | description |
|---|
| contextmenu | ContextMenuInstance | null | The ContextMenu component instance. |
| menu | MenuInstance | null | Instance of the Menu component. |
Interfaces#
PassThroughOptions
Defines passthrough(pt) options of ContextMenuPortal component.
| name | type | default | description |
|---|
| root | MenuPortalPassThroughType<HTMLAttributes<HTMLDivElement>> | null | Used to pass attributes to the root's DOM element. |
Props#
Defines valid properties in ContextMenuIcon component.
| name | type | default | description |
|---|
| ref | Ref<unknown> | null | The reference to the component instance. |
| pIf | boolean | true | Whether the component should be rendered. |
| style | CSSProperties | ((instance?: ContextMenuIconInstance) => CSSProperties) | null | The style to apply to the component. |
| className | string | ((instance?: ContextMenuIconInstance) => string) | null | The class name to apply to the component. |
| as | string | 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. |
| asChild | boolean | false | Whether the component should be rendered as a child component. |
| pt | SafeRecord<ContextMenuIconPassThrough> | null | The pass-through props to pass to the component |
| ptOptions | PassThroughOptions | null | The pass-through options to pass to the component |
| unstyled | boolean | null | Whether the component should be rendered without classes. |
| dt | unknown | null | The design token to use for the component. |
| styles | StylesOptions<ComponentInstance> | null | The styles to use for the component. |
| children | ReactNode | ((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.
| name | type | default | description |
|---|
| contextmenu | ContextMenuInstance | null | The ContextMenu component instance. |
| menu | MenuInstance | null | Instance of the Menu component. |
Interfaces#
PassThroughOptions
Defines passthrough(pt) options of ContextMenuIcon component.
| name | type | default | description |
|---|
| root | MenuIconPassThroughType<SVGAttributes<SVGElement>> | null | Used to pass attributes to the root's DOM element. |
Types#
Instance
Instance of ContextMenuIcon component.
| values |
|---|
| ComponentInstance<ContextMenuIconProps, ContextMenuIconState, ContextMenuIconExposes> |
Props#
Defines valid properties in MenuCheckboxGroup component.
| name | type | default | description |
|---|
| ref | Ref<unknown> | null | The reference to the component instance. |
| pIf | boolean | true | Whether the component should be rendered. |
| style | CSSProperties | ((instance?: MenuCheckboxGroupInstance) => CSSProperties) | null | The style to apply to the component. |
| className | string | ((instance?: MenuCheckboxGroupInstance) => string) | null | The class name to apply to the component. |
| as | string | 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. |
| asChild | boolean | false | Whether the component should be rendered as a child component. |
| pt | SafeRecord<MenuCheckboxGroupPassThrough> | null | The pass-through props to pass to the component |
| ptOptions | PassThroughOptions | null | The pass-through options to pass to the component |
| unstyled | boolean | null | Whether the component should be rendered without classes. |
| dt | unknown | null | The design token to use for the component. |
| styles | StylesOptions<ComponentInstance> | null | The styles to use for the component. |
| children | ReactNode | ((instance: MenuCheckboxGroupInstance) => ReactNode) | null | The children to render. |
| value | unknown[] | null | Values of the selected checkbox items. |
| defaultValue | unknown[] | 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.
| name | type | default | description |
|---|
| context | MenuCheckboxGroupContextInterface | null | Context value for the checkbox group containing the current selection state, change handler, and optional group name. |
Types#
Instance
Instance of MenuCheckboxGroup component.
| values |
|---|
| ComponentInstance<MenuCheckboxGroupProps, MenuCheckboxGroupState, MenuCheckboxGroupExposes> |
Props#
Defines valid properties in ContextMenuCheckboxItem component.
| name | type | default | description |
|---|
| ref | Ref<unknown> | null | The reference to the component instance. |
| pIf | boolean | true | Whether the component should be rendered. |
| style | CSSProperties | ((instance?: ContextMenuCheckboxItemInstance) => CSSProperties) | null | The style to apply to the component. |
| className | string | ((instance?: ContextMenuCheckboxItemInstance) => string) | null | The class name to apply to the component. |
| as | string | 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. |
| asChild | boolean | false | Whether the component should be rendered as a child component. |
| pt | SafeRecord<ContextMenuCheckboxItemPassThrough> | null | The pass-through props to pass to the component |
| ptOptions | PassThroughOptions | null | The pass-through options to pass to the component |
| unstyled | boolean | null | Whether the component should be rendered without classes. |
| dt | unknown | null | The design token to use for the component. |
| styles | StylesOptions<ComponentInstance> | null | The styles to use for the component. |
| children | ReactNode | ((instance: ContextMenuCheckboxItemInstance) => ReactNode) | null | The children to render. |
| disabled | boolean | 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.
| name | type | default | description |
|---|
| contextmenu | ContextMenuInstance | null | The ContextMenu component instance. |
| menu | MenuInstance | null | Instance of the Menu component. |
Interfaces#
PassThroughOptions
Defines passthrough(pt) options of ContextMenuCheckboxItem component.
| name | type | default | description |
|---|
| root | MenuCheckboxItemPassThroughType<HTMLAttributes<HTMLLIElement>> | null | Used to pass attributes to the root's DOM element. |
Types#
Instance
Instance of ContextMenuCheckboxItem component.
| values |
|---|
| ComponentInstance<ContextMenuCheckboxItemProps, ContextMenuCheckboxItemState, ContextMenuCheckboxItemExposes> |
Props#
Defines valid properties in ContextMenuRadioGroup component.
| name | type | default | description |
|---|
| ref | Ref<unknown> | null | The reference to the component instance. |
| pIf | boolean | true | Whether the component should be rendered. |
| style | CSSProperties | ((instance?: ContextMenuRadioGroupInstance) => CSSProperties) | null | The style to apply to the component. |
| className | string | ((instance?: ContextMenuRadioGroupInstance) => string) | null | The class name to apply to the component. |
| as | string | 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. |
| asChild | boolean | false | Whether the component should be rendered as a child component. |
| pt | SafeRecord<ContextMenuRadioGroupPassThrough> | null | The pass-through props to pass to the component |
| ptOptions | PassThroughOptions | null | The pass-through options to pass to the component |
| unstyled | boolean | null | Whether the component should be rendered without classes. |
| dt | unknown | null | The design token to use for the component. |
| styles | StylesOptions<ComponentInstance> | null | The styles to use for the component. |
| children | ReactNode | ((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.
| name | type | default | description |
|---|
| contextmenu | ContextMenuInstance | null | The ContextMenu component instance. |
| menu | MenuInstance | null | Instance of the Menu component. |
Types#
Instance
Instance of ContextMenuRadioGroup component.
| values |
|---|
| ComponentInstance<ContextMenuRadioGroupProps, ContextMenuRadioGroupState, ContextMenuRadioGroupExposes> |
Props#
Defines valid properties in ContextMenuRadioItem component.
| name | type | default | description |
|---|
| ref | Ref<unknown> | null | The reference to the component instance. |
| pIf | boolean | true | Whether the component should be rendered. |
| style | CSSProperties | ((instance?: ContextMenuRadioItemInstance) => CSSProperties) | null | The style to apply to the component. |
| className | string | ((instance?: ContextMenuRadioItemInstance) => string) | null | The class name to apply to the component. |
| as | string | 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. |
| asChild | boolean | false | Whether the component should be rendered as a child component. |
| pt | SafeRecord<ContextMenuRadioItemPassThrough> | null | The pass-through props to pass to the component |
| ptOptions | PassThroughOptions | null | The pass-through options to pass to the component |
| unstyled | boolean | null | Whether the component should be rendered without classes. |
| dt | unknown | null | The design token to use for the component. |
| styles | StylesOptions<ComponentInstance> | null | The styles to use for the component. |
| children | ReactNode | ((instance: ContextMenuRadioItemInstance) => ReactNode) | null | The children to render. |
| disabled | boolean | 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.
| name | type | default | description |
|---|
| contextmenu | ContextMenuInstance | null | The ContextMenu component instance. |
| menu | MenuInstance | null | Instance of the Menu component. |
Events#
Interfaces#
PassThroughOptions
Defines passthrough(pt) options of ContextMenuRadioItem component.
| name | type | default | description |
|---|
| root | MenuRadioItemPassThroughType<HTMLAttributes<HTMLLIElement>> | null | Used to pass attributes to the root's DOM element. |
Types#
Instance
Instance of ContextMenuRadioItem component.
| values |
|---|
| ComponentInstance<ContextMenuRadioItemProps, ContextMenuRadioItemState, ContextMenuRadioItemExposes> |
Props#
Defines valid properties in ContextMenuCheckboxIcon component.
| name | type | default | description |
|---|
| ref | Ref<unknown> | null | The reference to the component instance. |
| pIf | boolean | true | Whether the component should be rendered. |
| style | CSSProperties | ((instance?: ContextMenuCheckboxIconInstance) => CSSProperties) | null | The style to apply to the component. |
| className | string | ((instance?: ContextMenuCheckboxIconInstance) => string) | null | The class name to apply to the component. |
| as | string | 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. |
| asChild | boolean | false | Whether the component should be rendered as a child component. |
| pt | SafeRecord<ContextMenuCheckboxIconPassThrough> | null | The pass-through props to pass to the component |
| ptOptions | PassThroughOptions | null | The pass-through options to pass to the component |
| unstyled | boolean | null | Whether the component should be rendered without classes. |
| dt | unknown | null | The design token to use for the component. |
| styles | StylesOptions<ComponentInstance> | null | The styles to use for the component. |
| children | ReactNode | ((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.
| name | type | default | description |
|---|
| contextmenu | ContextMenuInstance | null | The ContextMenu component instance. |
| menu | MenuInstance | null | Instance of the Menu component. |
Interfaces#
PassThroughOptions
Defines passthrough(pt) options of ContextMenuCheckboxIcon component.
| name | type | default | description |
|---|
| root | MenuCheckboxIconPassThroughType<SVGAttributes<SVGElement>> | null | Used to pass attributes to the root's DOM element. |
Types#
Instance
Instance of ContextMenuCheckboxIcon component.
| values |
|---|
| ComponentInstance<ContextMenuCheckboxIconProps, ContextMenuCheckboxIconState, ContextMenuCheckboxIconExposes> |
Props#
Defines valid properties in ContextMenuRadioIcon component.
| name | type | default | description |
|---|
| ref | Ref<unknown> | null | The reference to the component instance. |
| pIf | boolean | true | Whether the component should be rendered. |
| style | CSSProperties | ((instance?: ContextMenuRadioIconInstance) => CSSProperties) | null | The style to apply to the component. |
| className | string | ((instance?: ContextMenuRadioIconInstance) => string) | null | The class name to apply to the component. |
| as | string | 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. |
| asChild | boolean | false | Whether the component should be rendered as a child component. |
| pt | SafeRecord<ContextMenuRadioIconPassThrough> | null | The pass-through props to pass to the component |
| ptOptions | PassThroughOptions | null | The pass-through options to pass to the component |
| unstyled | boolean | null | Whether the component should be rendered without classes. |
| dt | unknown | null | The design token to use for the component. |
| styles | StylesOptions<ComponentInstance> | null | The styles to use for the component. |
| children | ReactNode | ((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.
| name | type | default | description |
|---|
| contextmenu | ContextMenuInstance | null | The ContextMenu component instance. |
| menu | MenuInstance | null | Instance of the Menu component. |
Interfaces#
PassThroughOptions
Defines passthrough(pt) options of ContextMenuRadioIcon component.
| name | type | default | description |
|---|
| root | MenuRadioIconPassThroughType<SVGAttributes<SVGElement>> | null | Used to pass attributes to the root's DOM element. |
Types#
Instance
Instance of ContextMenuRadioIcon component.
| values |
|---|
| ComponentInstance<ContextMenuRadioIconProps, ContextMenuRadioIconState, ContextMenuRadioIconExposes> |
Types#
Instance
Instance of useContextMenu headless.
| values |
|---|
| HeadlessInstance<useContextMenuProps, useContextMenuState, useContextMenuExposes> |