Menu API

API documentation for Menu component

Props#

Defines valid properties in Menu component.

nametypedefaultdescription
refRef<unknown>
null
The reference to the component instance.
pIfboolean
true
Whether the component should be rendered.
styleCSSProperties | ((instance?: MenuInstance) => CSSProperties)
null
The style to apply to the component.
classNamestring | ((instance?: MenuInstance) => 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<MenuPassThrough>
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: MenuInstance) => ReactNode)
null
The children to render.
onOpenChange(event: MenuOpenChangeEvent) => void
null
Callback fired when the menu's open state changes.
openboolean
null
Controlled open state of the menu.
defaultOpenboolean
false
Default open state for uncontrolled mode.
compositeboolean
false
Whether the menu is in composite mode (menubar). In composite mode, submenus open on hover and focusedOptionId is an array tracking the focus path.
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 Menu 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 Menu 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 menu's open state changes.

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

Interfaces#

Defines passthrough(pt) options of Menu 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 Menu component.

values
ComponentInstance<MenuProps, MenuState, MenuExposes>

Props#

Defines valid properties in MenuList component.

nametypedefaultdescription
refRef<unknown>
null
The reference to the component instance.
pIfboolean
true
Whether the component should be rendered.
styleCSSProperties | ((instance?: MenuListInstance) => CSSProperties)
null
The style to apply to the component.
classNamestring | ((instance?: MenuListInstance) => 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<MenuListPassThrough>
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: MenuListInstance) => 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 MenuList component.

nametypedefaultdescription
menuMenuInstance
null
Instance of the Menu component.
submenuMenuSubInstance
null
Instance of the MenuSub component.
parentLevelMenuLevelContextInterface
null
Context value of the MenuLevel.
listLevelnumber
null
Level of the list.
listIdstring
null
ID of the list element.
triggerIndexnumber
null
Index of the trigger element.

Interfaces#

Defines passthrough(pt) options of MenuList 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 MenuList component.

values
ComponentInstance<MenuListProps, MenuListState, MenuListExposes>

Props#

Defines valid properties in MenuLabel component.

nametypedefaultdescription
refRef<unknown>
null
The reference to the component instance.
pIfboolean
true
Whether the component should be rendered.
styleCSSProperties | ((instance?: MenuLabelInstance) => CSSProperties)
null
The style to apply to the component.
classNamestring | ((instance?: MenuLabelInstance) => 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<MenuLabelPassThrough>
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: MenuLabelInstance) => 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 MenuLabel component.

nametypedefaultdescription
menuMenuInstance
null
Instance of the Menu component.

Interfaces#

Defines passthrough(pt) options of MenuLabel component.

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

Types#

Instance of MenuLabel component.

values
ComponentInstance<MenuLabelProps, MenuLabelState, MenuLabelExposes>

Props#

Defines valid properties in MenuSub component.

nametypedefaultdescription
refRef<unknown>
null
The reference to the component instance.
pIfboolean
true
Whether the component should be rendered.
styleCSSProperties | ((instance?: MenuSubInstance) => CSSProperties)
null
The style to apply to the component.
classNamestring | ((instance?: MenuSubInstance) => 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<MenuSubPassThrough>
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: MenuSubInstance) => ReactNode)
null
The children to render.
disabledboolean
false
Whether the submenu is disabled.
onOpenChange(event: MenuSubOpenChangeEvent) => void
null
Callback fired when the submenu's open state changes.
openboolean
null
Controlled open state of the submenu.
defaultOpenboolean
false
Default open state for uncontrolled mode.
[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 MenuSub component.

nametypedefaultdescription
openedboolean
null
Whether the submenu is opened.

Exposes#

Defines the methods and properties exposed by MenuSub component.

nametypedefaultdescription
menuMenuInstance
null
The Menu component instance.
parentLevelMenuLevelContextInterface
null
Context value of the MenuLevel.
stateuseMenuSubState
null
The state of the useMenuSub.
portalRefRefObject<{ containerRef: { current: { elementRef: RefObject<HTMLDivElement> } } }>
null
Reference to the portal element.
triggerRefRefObject<HTMLDivElement>
null
Reference to the trigger element.
listRefRefObject<HTMLUListElement>
null
Reference to the list element.
toggle() => void
null
Toggle the submenu open/close state.
open() => void
null
Open the submenu (composite mode).
close() => void
null
Close the submenu (composite mode).
onTriggerClick() => void
null
Handle trigger click event.

Events#

Event fired when the menu's open state changes.

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

Interfaces#

Defines passthrough(pt) options of MenuSub component.

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

Types#

Instance of MenuSub component.

values
ComponentInstance<MenuSubProps, MenuSubState, MenuSubExposes>

Props#

Defines valid properties in MenuSeparator component.

nametypedefaultdescription
refRef<unknown>
null
The reference to the component instance.
pIfboolean
true
Whether the component should be rendered.
styleCSSProperties | ((instance?: MenuSeparatorInstance) => CSSProperties)
null
The style to apply to the component.
classNamestring | ((instance?: MenuSeparatorInstance) => 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<MenuSeparatorPassThrough>
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: MenuSeparatorInstance) => 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 MenuSeparator component.

nametypedefaultdescription
menuMenuInstance
null
Instance of the Menu component.

Interfaces#

Defines passthrough(pt) options of MenuSeparator component.

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

Types#

Instance of MenuSeparator component.

values
ComponentInstance<MenuSeparatorProps, MenuSeparatorState, MenuSeparatorExposes>

Props#

Defines valid properties in MenuTrigger component.

nametypedefaultdescription
refRef<unknown>
null
The reference to the component instance.
pIfboolean
true
Whether the component should be rendered.
styleCSSProperties | ((instance?: MenuTriggerInstance) => CSSProperties)
null
The style to apply to the component.
classNamestring | ((instance?: MenuTriggerInstance) => 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<MenuTriggerPassThrough>
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: MenuTriggerInstance) => 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 MenuTrigger component.

nametypedefaultdescription
menuMenuInstance
null
Instance of the Menu component.
submenuMenuSubInstance
null
Instance of the MenuPortal component.
portalMenuPortalInstance
null
Instance of the MenuPortal component.
levelMenuLevelContextInterface
null
Instance of the MenuLevel component.
itemIdstring
null
Identifier of the menu item.
focusedboolean
null
Whether the menu item is focused.
disabledboolean
null
Whether the menu item is disabled.
ariaLevelnumber
null
Aria level of the menu item.
ariaPosInSetnumber
null
Aria position in set of the menu item.
ariaSetSizenumber
null
Aria set size of the menu item.

Interfaces#

Defines passthrough(pt) options of MenuTrigger component.

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

Types#

Instance of MenuTrigger component.

values
ComponentInstance<MenuTriggerProps, MenuTriggerState, MenuTriggerExposes>

Props#

Defines valid properties in MenuPortal component.

nametypedefaultdescription
refRef<unknown>
null
The reference to the component instance.
pIfboolean
true
Whether the component should be rendered.
styleCSSProperties | ((instance?: MenuPortalInstance) => CSSProperties)
null
The style to apply to the component.
classNamestring | ((instance?: MenuPortalInstance) => 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<MenuPortalPassThrough>
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: MenuPortalInstance) => 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 MenuPortal component.

nametypedefaultdescription
menuMenuInstance
null
Instance of the Menu component.

Interfaces#

Defines passthrough(pt) options of MenuPortal component.

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

Props#

Defines valid properties in MenuIcon component.

nametypedefaultdescription
refRef<unknown>
null
The reference to the component instance.
pIfboolean
true
Whether the component should be rendered.
styleCSSProperties | ((instance?: MenuIconInstance) => CSSProperties)
null
The style to apply to the component.
classNamestring | ((instance?: MenuIconInstance) => 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<MenuIconPassThrough>
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: MenuIconInstance) => 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 MenuIcon component.

nametypedefaultdescription
menuMenuInstance
null
The Menu component instance.

Interfaces#

Defines passthrough(pt) options of MenuIcon component.

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

Types#

Instance of MenuIcon component.

values
ComponentInstance<MenuIconProps, MenuIconState, MenuIconExposes>

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>

Props#

Defines valid properties in MenuItem component.

nametypedefaultdescription
refRef<unknown>
null
The reference to the component instance.
pIfboolean
true
Whether the component should be rendered.
styleCSSProperties | ((instance?: MenuItemInstance) => CSSProperties)
null
The style to apply to the component.
classNamestring | ((instance?: MenuItemInstance) => 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<MenuItemPassThrough>
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: MenuItemInstance) => 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 MenuItem component.

nametypedefaultdescription
menuMenuInstance
null
Instance of the Menu component.
submenuMenuSubInstance
null
Instance of the MenuSub component.
portalMenuPortalInstance
null
Instance of the MenuPortal component.
levelMenuLevelContextInterface
null
Context value of the MenuLevel.
itemRefRefObject<HTMLElement>
null
Reference to the item element.
itemIdstring
null
ID of the item element.
focusedboolean
null
Whether the item is focused or not.
ariaLevelnumber
null
Aria level of the item.
ariaPosInSetnumber
null
Aria position in set of the item.
ariaSetSizenumber
null
Aria set size of the item.

Interfaces#

Defines passthrough(pt) options of MenuItem component.

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

Types#

Instance of MenuItem component.

values
ComponentInstance<MenuItemProps, MenuItemState, MenuItemExposes>

Props#

Defines valid properties in MenuCheckboxItem component.

nametypedefaultdescription
refRef<unknown>
null
The reference to the component instance.
pIfboolean
true
Whether the component should be rendered.
styleCSSProperties | ((instance?: MenuCheckboxItemInstance) => CSSProperties)
null
The style to apply to the component.
classNamestring | ((instance?: MenuCheckboxItemInstance) => 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<MenuCheckboxItemPassThrough>
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: MenuCheckboxItemInstance) => ReactNode)
null
The children to render.
checkedboolean
null
Whether the checkbox item is checked or not.
defaultCheckedboolean
null
Default checked state of the checkbox item.
disabledboolean
null
When present, it specifies that the item should be disabled.
onCheckedChange(event: MenuCheckboxItemCheckedChangeEvent) => void
null
Callback to invoke when checked state changes.
[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 MenuCheckboxItem component.

nametypedefaultdescription
menuMenuInstance
null
Instance of the Menu component.
submenuMenuSubInstance
null
Instance of the MenuSub component.
portalMenuPortalInstance
null
Instance of the MenuPortal component.
checkboxGroupMenuCheckboxGroupContextInterface
null
Context value of the MenuCheckboxGroup.
levelMenuLevelContextInterface
null
Context value of the MenuLevel.
itemRefRefObject<HTMLElement>
null
Reference to the item element.
itemIdstring
null
ID of the item element.
focusedboolean
null
Whether the item is focused or not.
ariaLevelnumber
null
Aria level of the item.
ariaPosInSetnumber
null
Aria position in set of the item.
ariaSetSizenumber
null
Aria set size of the item.
checkedboolean
null
Whether the checkbox is checked or not.
handleCheckedChange(checked: boolean) => void
null
Handler to change checked state.

Interfaces#

Defines passthrough(pt) options of MenuCheckboxItem component.

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

Types#

Instance of MenuCheckboxItem component.

values
ComponentInstance<MenuCheckboxItemProps, MenuCheckboxItemState, MenuCheckboxItemExposes>

Props#

Defines valid properties in MenuRadioGroup component.

nametypedefaultdescription
refRef<unknown>
null
The reference to the component instance.
pIfboolean
true
Whether the component should be rendered.
styleCSSProperties | ((instance?: MenuRadioGroupInstance) => CSSProperties)
null
The style to apply to the component.
classNamestring | ((instance?: MenuRadioGroupInstance) => 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<MenuRadioGroupPassThrough>
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: MenuRadioGroupInstance) => ReactNode)
null
The children to render.
valueunknown
null
Value of the selected radio item.
defaultValueunknown
null
Default value of the selected radio item.
namestring
null
Name for the radio group.
onValueChange(event: MenuRadioGroupValueChangeEvent) => void
null
Callback to invoke when value changes.
[key: string]any
null

Exposes#

Defines the methods and properties exposed by MenuRadioGroup component.

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

Types#

Instance of MenuRadioGroup component.

values
ComponentInstance<MenuRadioGroupProps, MenuRadioGroupState, MenuRadioGroupExposes>

Props#

Defines valid properties in MenuRadioItem component.

nametypedefaultdescription
refRef<unknown>
null
The reference to the component instance.
pIfboolean
true
Whether the component should be rendered.
styleCSSProperties | ((instance?: MenuRadioItemInstance) => CSSProperties)
null
The style to apply to the component.
classNamestring | ((instance?: MenuRadioItemInstance) => 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<MenuRadioItemPassThrough>
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: MenuRadioItemInstance) => ReactNode)
null
The children to render.
valueunknown
null
Value of the radio item.
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 MenuRadioItem component.

nametypedefaultdescription
menuMenuInstance
null
Instance of the Menu component.
submenuMenuSubInstance
null
Instance of the MenuSub component.
portalMenuPortalInstance
null
Instance of the MenuPortal component.
levelMenuLevelContextInterface
null
Context value of the MenuLevel.
radioGroupMenuRadioGroupContextInterface
null
Context value of the MenuRadioGroup.
itemRefRefObject<HTMLElement>
null
Reference to the item element.
itemIdstring
null
ID of the item element.
focusedboolean
null
Whether the item is focused or not.
ariaLevelnumber
null
Aria level of the item.
ariaPosInSetnumber
null
Aria position in set of the item.
ariaSetSizenumber
null
Aria set size of the item.
checkedboolean
null
Whether the radio item is checked or not.
handleValueChange() => void
null
Handler to select this radio item.

Events#

Interfaces#

Defines passthrough(pt) options of MenuRadioItem component.

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

Types#

Instance of MenuRadioItem component.

values
ComponentInstance<MenuRadioItemProps, MenuRadioItemState, MenuRadioItemExposes>

Props#

Defines valid properties in MenuCheckboxIcon component.

nametypedefaultdescription
refRef<unknown>
null
The reference to the component instance.
pIfboolean
true
Whether the component should be rendered.
styleCSSProperties | ((instance?: MenuCheckboxIconInstance) => CSSProperties)
null
The style to apply to the component.
classNamestring | ((instance?: MenuCheckboxIconInstance) => 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<MenuCheckboxIconPassThrough>
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: MenuCheckboxIconInstance) => 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 MenuCheckboxIcon component.

nametypedefaultdescription
menuMenuInstance
null
The Menu component instance.
checkboxitemMenuCheckboxItemInstance
null
Instance of the MenuCheckboxItem component.

Interfaces#

Defines passthrough(pt) options of MenuCheckboxIcon component.

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

Types#

Instance of MenuCheckboxIcon component.

values
ComponentInstance<MenuCheckboxIconProps, MenuCheckboxIconState, MenuCheckboxIconExposes>

Props#

Defines valid properties in MenuRadioIcon component.

nametypedefaultdescription
refRef<unknown>
null
The reference to the component instance.
pIfboolean
true
Whether the component should be rendered.
styleCSSProperties | ((instance?: MenuRadioIconInstance) => CSSProperties)
null
The style to apply to the component.
classNamestring | ((instance?: MenuRadioIconInstance) => 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<MenuRadioIconPassThrough>
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: MenuRadioIconInstance) => 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 MenuRadioIcon component.

nametypedefaultdescription
menuMenuInstance
null
The Menu component instance.
radioitemMenuRadioItemInstance
null
Instance of the MenuRadioItem component.

Interfaces#

Defines passthrough(pt) options of MenuRadioIcon component.

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

Types#

Instance of MenuRadioIcon component.

values
ComponentInstance<MenuRadioIconProps, MenuRadioIconState, MenuRadioIconExposes>

useMenu#

Types#

Instance of useMenu headless.

values
HeadlessInstance<useMenuProps, useMenuState, useMenuExposes>

useMenuSub#

Types#

Instance of useMenuSub headless.

values
HeadlessInstance<useMenuSubProps, useMenuSubState, useMenuSubExposes>