Filter Menu
A searchable menu for finding and running actions in a dropdown.
Usage guidelines
- Use for searchable actions: Choose
FilterMenuwhen users need to find an action from a modest list. Use Menu for a short list that does not need search. - Use value-selection components for values: Choose FilterSelect for a trigger-first control with a transient filter. Choose Combobox when the input is the control or the results are large, virtualized, or loaded asynchronously.
- Name the filter input: Give
<FilterMenu.Input>an accessible name witharia-label,aria-labelledby, or a visible native<label>.
Anatomy
Import the component and assemble its parts:
FilterMenu uses the same action-item patterns as Menu, including checkbox items, radio groups, links, groups, and submenus. Use the FilterMenu parts throughout the tree so the filtering behavior and keyboard navigation stay connected.
Examples
Filtering items
Items are matched against their label prop, falling back to their rendered text. Add keywords to an item when it should also match alternate names or related terms.
Pass label explicitly when text is rendered by a custom component, localized, or can change while the item is filtered out. Filtered-out items are unmounted, so their rendered text is no longer available to inspect.
Groups with no matching items are hidden, including their group labels. FilterMenu.Empty is shown when no registered items match the query.
Controlled query
Use inputValue and onInputValueChange when the query needs to be synchronized with application state. defaultInputValue sets the initial query for uncontrolled usage.
The query is cleared when the popup closes. If the query is controlled, update the value in onInputValueChange for the clear and close events as well as for typing.
Custom matching
Pass filter to replace the default case-insensitive contains matching. The callback receives the item’s filter text and the trimmed query:
When a custom filter is provided, it is authoritative and keywords are ignored.
Filterable submenus
Filtering is scoped to the nearest filter root. Use <FilterMenu.SubmenuRoot> when a submenu needs its own input; a regular <Menu.SubmenuRoot> does not become filterable automatically.
API reference
Root
defaultInputValuestring—
- Description
The uncontrolled filter query when the menu is initially rendered. To render a controlled query, use the
inputValueprop instead.- Type
inputValuestring—
- Name
- Description
The filter query. Use when controlled. The query is cleared when the popup closes.
- Type
onInputValueChangefunction—
- Description
Event handler called when the filter query changes.
- Type
defaultOpenbooleanfalse
- Name
- Description
Whether the menu is initially open.
To render a controlled menu, use the
openprop instead.- Type
- Default
false
openboolean—
- Name
- Description
Whether the menu is currently open.
- Type
onOpenChangefunction—
- Name
- Description
Event handler called when the menu is opened or closed.
- Type
highlightItemOnHoverbooleantrue
- Description
Whether moving the pointer over items should highlight them. Disabling this prop allows CSS
:hoverto be differentiated from the:focus(data-highlighted) state.- Type
- Default
true
actionsRefReact.RefObject<MenuRoot.Actions | null>—
- Name
- Description
A ref to imperative actions.
unmount: Manually unmounts the menu. Call this after any externally controlled closing animation finishes.close: When specified, the menu can be closed imperatively.
- Type
closeParentOnEscbooleanfalse
- Name
- Description
When in a submenu, determines whether pressing the Escape key closes the entire menu, or only the current child menu.
- Type
- Default
false
defaultTriggerIdstring | null—
- Name
- Description
ID of the trigger that the menu is associated with. This is useful in conjunction with the
defaultOpenprop to create an initially open menu.- Type
filterFilterDropdownFilter—
- Name
- Description
Replaces the default case-insensitive substring matching for item text. Receives an item’s filter text and the trimmed query. When provided, this function is authoritative and item keywords are ignored.
- Type
handleFilterMenu.Handle<Payload>—
- Name
- Description
A handle to associate the menu with a trigger. If specified, allows external triggers to control the menu’s open state.
- Type
localeIntl.LocalesArgument—
- Name
- Description
Locale used when comparing an item against the query. Defaults to the runtime’s default locale.
- Type
loopFocusbooleantrue
- Name
- Description
Whether to loop keyboard focus back to the first item when the end of the list is reached while using the arrow keys.
- Type
- Default
true
modalbooleantrue
- Name
- Description
Determines if the menu enters a modal state when open.
true: user interaction is limited to the menu: document page scroll is locked and pointer interactions on outside elements are disabled.false: user interaction with the rest of the document is allowed.
On touch devices, a
truemodal blocks outside taps but leaves the page scrollable unless the popup spans nearly the full viewport width, matching native iOS behavior.Nested menus ignore this prop, and menus opened by hover are never modal.
- Type
- Default
true
onOpenChangeCompletefunction—
- Description
Event handler called after any animations complete when the menu is opened or closed.
- Type
triggerIdstring | null—
- Name
- Description
ID of the trigger that the menu is associated with. This is useful in conjunction with the
openprop to create a controlled menu. There’s no need to specify this prop when the menu is uncontrolled (that is, when theopenprop is not set).- Type
disabledbooleanfalse
- Name
- Description
Whether the component should ignore user interaction.
- Type
- Default
false
orientationMenuRoot.Orientation'vertical'
- Name
- Description
The visual orientation of the menu. Controls whether roving focus uses up/down or left/right arrow keys.
- Type
- Default
'vertical'
children| React.ReactNode
| PayloadChildRenderFunction<Payload>—
| PayloadChildRenderFunction<Payload>
- Name
- Description
The content of the menu. This can be a regular React node or a render function that receives the
payloadof the active trigger.- Type
FilterMenu.Root.StateHide
FilterMenu.Root.ActionsHide
FilterMenu.Root.ChangeEventReasonHide
FilterMenu.Root.ChangeEventDetailsHide
FilterMenu.Root.InputValueChangeEventDetailsHide
FilterMenu.Root.InputValueChangeEventReasonHide
Trigger
handleFilterMenu.Handle<Payload>—
- Name
- Description
A handle to associate the trigger with a menu.
- Type
nativeButtonbooleantrue
- Name
- Description
Whether the component renders a native
<button>element when replacing it via therenderprop. Set tofalseif the rendered element is not a button (for example,<div>).- Type
- Default
true
payloadPayload—
- Name
- Description
A payload to pass to the menu when it is opened.
- Type
disabledbooleanfalse
- Name
- Description
Whether the component should ignore user interaction.
- Type
- Default
false
openOnHoverboolean—
- Name
- Description
Whether the menu should also open when the trigger is hovered.
- Type
delaynumber100
- Name
- Description
How long to wait before the menu may be opened on hover. Specified in milliseconds.
Requires the
openOnHoverprop.- Type
- Default
100
closeDelaynumber0
- Name
- Description
How long to wait before closing the menu that was opened on hover. Specified in milliseconds.
Requires the
openOnHoverprop.- Type
- Default
0
idstring—
- Name
- Type
childrenReact.ReactNode—
- Name
- Type
classNamestring | function—
- Name
- Description
CSS class applied to the element, or a function that returns a class based on the component’s state.
- Type
styleReact.CSSProperties | function—
- Name
- Description
Style applied to the element, or a function that returns a style object based on the component’s state.
- Type
renderReactElement | function—
- Name
- Description
Allows you to replace the component’s HTML element with a different tag, or compose it with another component.
Accepts a
ReactElementor a function that returns the element to render.- Type
FilterMenu.Trigger.StateHide
Portal
A portal element that moves the popup to a different part of the DOM.
By default, the portal element is appended to <body>.
Renders a <div> element.
containerUnion—
- Name
- Description
A parent element to render the portal element into.
- Type
classNamestring | function—
- Name
- Description
CSS class applied to the element, or a function that returns a class based on the component’s state.
- Type
styleReact.CSSProperties | function—
- Name
- Description
Style applied to the element, or a function that returns a style object based on the component’s state.
- Type
keepMountedbooleanfalse
- Name
- Description
Whether to keep the portal mounted in the DOM while the popup is hidden.
- Type
- Default
false
renderReactElement | function—
- Name
- Description
Allows you to replace the component’s HTML element with a different tag, or compose it with another component.
Accepts a
ReactElementor a function that returns the element to render.- Type
FilterMenu.Portal.StateHide
Backdrop
An overlay displayed beneath the menu popup.
Renders a <div> element.
classNamestring | function—
- Name
- Description
CSS class applied to the element, or a function that returns a class based on the component’s state.
- Type
styleReact.CSSProperties | function—
- Name
- Description
Style applied to the element, or a function that returns a style object based on the component’s state.
- Type
renderReactElement | function—
- Name
- Description
Allows you to replace the component’s HTML element with a different tag, or compose it with another component.
Accepts a
ReactElementor a function that returns the element to render.- Type
FilterMenu.Backdrop.StateHide
Positioner
Positions the menu popup against the trigger.
Renders a <div> element.
disableAnchorTrackingbooleanfalse
- Description
Whether to disable the popup from tracking any layout shift of its positioning anchor.
- Type
- Default
false
alignAlign'center'
- Name
- Description
How to align the popup relative to the specified side.
- Type
- Default
'center'
alignOffsetnumber | OffsetFunction0
- Name
- Description
Additional offset along the alignment axis in pixels. Also accepts a function that returns the offset to read the dimensions of the anchor and positioner elements, along with its side and alignment.
The function takes a
dataobject parameter with the following properties:data.anchor: the dimensions of the anchor element with propertieswidthandheight.data.positioner: the dimensions of the positioner element with propertieswidthandheight.data.side: which side of the anchor element the positioner is aligned against.data.align: how the positioner is aligned relative to the specified side.
- Type
- Default
0- Example
sideSide'bottom'
- Name
- Description
Which side of the anchor element to align the popup against. May automatically change to avoid collisions.
- Type
- Default
'bottom'
sideOffsetnumber | OffsetFunction0
- Name
- Description
Distance between the anchor and the popup in pixels. Also accepts a function that returns the distance to read the dimensions of the anchor and positioner elements, along with its side and alignment.
The function takes a
dataobject parameter with the following properties:data.anchor: the dimensions of the anchor element with propertieswidthandheight.data.positioner: the dimensions of the positioner element with propertieswidthandheight.data.side: which side of the anchor element the positioner is aligned against.data.align: how the positioner is aligned relative to the specified side.
- Type
- Default
0- Example
arrowPaddingnumber5
- Name
- Description
Minimum distance to maintain between the arrow and the edges of the popup.
Use it to prevent the arrow element from hanging out of the rounded corners of a popup.
- Type
- Default
5
anchorUnion—
- Name
- Description
An element to position the popup against. By default, the popup will be positioned against the trigger.
- Type
collisionAvoidanceCollisionAvoidance—
- Description
Determines how to handle collisions when positioning the popup.
sidecontrols overflow on the preferred placement axis (top/bottomorleft/right):'flip': keep the requested side when it fits; otherwise try the opposite side (topandbottom, orleftandright).'shift': never change side; keep the requested side and move the popup within the clipping boundary so it stays visible.'none': do not correct side-axis overflow.
aligncontrols overflow on the alignment axis (start/center/end):'flip': keep side, but swapstartandendwhen the requested alignment overflows.'shift': keep side and requested alignment, then nudge the popup along the alignment axis to fit.'none': do not correct alignment-axis overflow.
fallbackAxisSidecontrols fallback behavior on the perpendicular axis when the preferred axis cannot fit:'start': allow perpendicular fallback and try the logical start side first (topbeforebottom, orleftbeforerightin LTR).'end': allow perpendicular fallback and try the logical end side first (bottombeforetop, orrightbeforeleftin LTR).'none': do not fallback to the perpendicular axis.
When
sideis'shift', explicitly settingalignonly supports'shift'or'none'. Ifalignis omitted, it defaults to'flip'.- Type
- Example
collisionBoundaryBoundary'clipping-ancestors'
- Description
An element or a rectangle that delimits the area that the popup is confined to.
- Type
- Default
'clipping-ancestors'
collisionPaddingPadding5
- Name
- Description
Additional space to maintain from the edge of the collision boundary.
- Type
- Default
5
stickybooleanfalse
- Name
- Description
Whether to maintain the popup in the viewport after the anchor element was scrolled out of view.
- Type
- Default
false
positionMethod'absolute' | 'fixed''absolute'
- Name
- Description
Determines which CSS
positionproperty to use.- Type
- Default
'absolute'
classNamestring | function—
- Name
- Description
CSS class applied to the element, or a function that returns a class based on the component’s state.
- Type
styleReact.CSSProperties | function—
- Name
- Description
Style applied to the element, or a function that returns a style object based on the component’s state.
- Type
renderReactElement | function—
- Name
- Description
Allows you to replace the component’s HTML element with a different tag, or compose it with another component.
Accepts a
ReactElementor a function that returns the element to render.- Type
FilterMenu.Positioner.PropsHide
Re-Export of Positioner props as FilterMenuPositionerProps
FilterMenu.Positioner.StateHide
Popup
finalFocusUnion—
- Name
- Description
Determines the element to focus when the menu is closed.
false: Do not move focus.true: Move focus based on the default behavior (trigger or previously focused element).RefObject: Move focus to the ref element.function: Called with the interaction type (mouse,touch,pen, orkeyboard). Return an element to focus,trueto use the default behavior, orfalse/undefinedto do nothing.
- Type
childrenReact.ReactNode—
- Name
- Type
classNamestring | function—
- Name
- Description
CSS class applied to the element, or a function that returns a class based on the component’s state.
- Type
styleReact.CSSProperties | function—
- Name
- Description
Style applied to the element, or a function that returns a style object based on the component’s state.
- Type
renderReactElement | function—
- Name
- Description
Allows you to replace the component’s HTML element with a different tag, or compose it with another component.
Accepts a
ReactElementor a function that returns the element to render.- Type
FilterMenu.Popup.StateHide
Input
classNamestring | function—
- Name
- Description
CSS class applied to the element, or a function that returns a class based on the component’s state.
- Type
styleReact.CSSProperties | function—
- Name
- Description
Style applied to the element, or a function that returns a style object based on the component’s state.
- Type
renderReactElement | function—
- Name
- Description
Allows you to replace the component’s HTML element with a different tag, or compose it with another component.
Accepts a
ReactElementor a function that returns the element to render.- Type
FilterMenu.Input.StateHide
Clear
nativeButtonbooleantrue
- Name
- Description
Whether the component renders a native
<button>element when replacing it via therenderprop. Set tofalseif the rendered element is not a button (for example,<div>).- Type
- Default
true
disabledbooleanfalse
- Name
- Description
Whether the component should ignore user interaction.
- Type
- Default
false
classNamestring | function—
- Name
- Description
CSS class applied to the element, or a function that returns a class based on the component’s state.
- Type
styleReact.CSSProperties | function—
- Name
- Description
Style applied to the element, or a function that returns a style object based on the component’s state.
- Type
renderReactElement | function—
- Name
- Description
Allows you to replace the component’s HTML element with a different tag, or compose it with another component.
Accepts a
ReactElementor a function that returns the element to render.- Type
FilterMenu.Clear.StateHide
Empty
classNamestring | function—
- Name
- Description
CSS class applied to the element, or a function that returns a class based on the component’s state.
- Type
styleReact.CSSProperties | function—
- Name
- Description
Style applied to the element, or a function that returns a style object based on the component’s state.
- Type
renderReactElement | function—
- Name
- Description
Allows you to replace the component’s HTML element with a different tag, or compose it with another component.
Accepts a
ReactElementor a function that returns the element to render.- Type
FilterMenu.Empty.StateHide
List
idstring—
- Name
- Type
classNamestring | function—
- Name
- Description
CSS class applied to the element, or a function that returns a class based on the component’s state.
- Type
styleReact.CSSProperties | function—
- Name
- Description
Style applied to the element, or a function that returns a style object based on the component’s state.
- Type
renderReactElement | function—
- Name
- Description
Allows you to replace the component’s HTML element with a different tag, or compose it with another component.
Accepts a
ReactElementor a function that returns the element to render.- Type
FilterMenu.List.StateHide
Viewport
A viewport for displaying content transitions.
This component is only required if one popup can be opened by multiple triggers, its content
changes based on the trigger, and switching between them is animated.
Renders a <div> element.
childrenReact.ReactNode—
- Name
- Description
The content to render inside the transition container.
- Type
classNamestring | function—
- Name
- Description
CSS class applied to the element, or a function that returns a class based on the component’s state.
- Type
styleReact.CSSProperties | function—
- Name
- Description
Style applied to the element, or a function that returns a style object based on the component’s state.
- Type
renderReactElement | function—
- Name
- Description
Allows you to replace the component’s HTML element with a different tag, or compose it with another component.
Accepts a
ReactElementor a function that returns the element to render.- Type
FilterMenu.Viewport.StateHide
Arrow
Displays an element positioned against the menu anchor.
Renders a <div> element.
classNamestring | function—
- Name
- Description
CSS class applied to the element, or a function that returns a class based on the component’s state.
- Type
styleReact.CSSProperties | function—
- Name
- Description
Style applied to the element, or a function that returns a style object based on the component’s state.
- Type
renderReactElement | function—
- Name
- Description
Allows you to replace the component’s HTML element with a different tag, or compose it with another component.
Accepts a
ReactElementor a function that returns the element to render.- Type
FilterMenu.Arrow.StateHide
Item
labelstring—
- Name
- Description
Overrides the text label to use when the item is matched during keyboard text navigation.
- Type
onClickfunction—
- Name
- Description
The click handler for the menu item.
- Type
closeOnClickbooleantrue
- Name
- Description
Whether to close the menu when the item is clicked.
- Type
- Default
true
keywordsstring[]—
- Name
- Type
nativeButtonbooleanfalse
- Name
- Description
Whether the component renders a native
<button>element when replacing it via therenderprop. Set totrueif the rendered element is a native button.- Type
- Default
false
disabledbooleanfalse
- Name
- Description
Whether the component should ignore user interaction.
- Type
- Default
false
classNamestring | function—
- Name
- Description
CSS class applied to the element, or a function that returns a class based on the component’s state.
- Type
styleReact.CSSProperties | function—
- Name
- Description
Style applied to the element, or a function that returns a style object based on the component’s state.
- Type
renderReactElement | function—
- Name
- Description
Allows you to replace the component’s HTML element with a different tag, or compose it with another component.
Accepts a
ReactElementor a function that returns the element to render.- Type
FilterMenu.Item.StateHide
LinkItem
labelstring—
- Name
- Description
Overrides the text label to use when the item is matched during keyboard text navigation.
- Type
closeOnClickbooleanfalse
- Name
- Description
Whether to close the menu when the item is clicked.
- Type
- Default
false
keywordsstring[]—
- Name
- Type
classNamestring | function—
- Name
- Description
CSS class applied to the element, or a function that returns a class based on the component’s state.
- Type
styleReact.CSSProperties | function—
- Name
- Description
Style applied to the element, or a function that returns a style object based on the component’s state.
- Type
renderReactElement | function—
- Name
- Description
Allows you to replace the component’s HTML element with a different tag, or compose it with another component.
Accepts a
ReactElementor a function that returns the element to render.- Type
FilterMenu.LinkItem.StateHide
SubmenuRoot
defaultInputValuestring—
- Description
The uncontrolled filter query when the submenu is initially rendered. To render a controlled query, use the
inputValueprop instead.- Type
inputValuestring—
- Name
- Description
The filter query. Use when controlled. The query is cleared when the popup closes.
- Type
onInputValueChangefunction—
- Description
Event handler called when the filter query changes.
- Type
defaultOpenbooleanfalse
- Name
- Description
Whether the submenu is initially open.
To render a controlled submenu, use the
openprop instead.- Type
- Default
false
openboolean—
- Name
- Description
Whether the submenu is currently open.
- Type
onOpenChangefunction—
- Name
- Description
Event handler called when the submenu is opened or closed.
- Type
highlightItemOnHoverbooleantrue
- Description
Whether moving the pointer over items should highlight them. Disabling this prop allows CSS
:hoverto be differentiated from the:focus(data-highlighted) state.- Type
- Default
true
actionsRefReact.RefObject<MenuRoot.Actions | null>—
- Name
- Description
A ref to imperative actions.
unmount: Manually unmounts the menu. Call this after any externally controlled closing animation finishes.close: When specified, the menu can be closed imperatively.
- Type
closeParentOnEscbooleanfalse
- Name
- Description
When in a submenu, determines whether pressing the Escape key closes the entire menu, or only the current child menu.
- Type
- Default
false
filterFilterDropdownFilter—
- Name
- Description
Replaces the default case-insensitive substring matching for item text. Receives an item’s filter text and the trimmed query. When provided, this function is authoritative and item keywords are ignored.
- Type
localeIntl.LocalesArgument—
- Name
- Description
Locale used when comparing an item against the query. Defaults to the runtime’s default locale.
- Type
loopFocusbooleantrue
- Name
- Description
Whether to loop keyboard focus back to the first item when the end of the list is reached while using the arrow keys.
- Type
- Default
true
onOpenChangeCompletefunction—
- Description
Event handler called after any animations complete when the menu is opened or closed.
- Type
disabledbooleanfalse
- Name
- Description
Whether the component should ignore user interaction.
- Type
- Default
false
orientationMenuRoot.Orientation'vertical'
- Name
- Description
The visual orientation of the menu. Controls whether roving focus uses up/down or left/right arrow keys.
- Type
- Default
'vertical'
childrenReact.ReactNode—
- Name
- Description
The content of the submenu.
- Type
SubmenuTrigger
labelstring—
- Name
- Description
Overrides the text label to use when the item is matched during keyboard text navigation.
- Type
onClickfunction—
- Name
- Type
keywordsstring[]—
- Name
- Type
nativeButtonbooleanfalse
- Name
- Description
Whether the component renders a native
<button>element when replacing it via therenderprop. Set totrueif the rendered element is a native button.- Type
- Default
false
disabledbooleanfalse
- Name
- Description
Whether the component should ignore user interaction.
- Type
- Default
false
openOnHoverboolean—
- Name
- Description
Whether the menu should also open when the trigger is hovered.
- Type
delaynumber100
- Name
- Description
How long to wait before the menu may be opened on hover. Specified in milliseconds.
Requires the
openOnHoverprop.- Type
- Default
100
closeDelaynumber0
- Name
- Description
How long to wait before closing the menu that was opened on hover. Specified in milliseconds.
Requires the
openOnHoverprop.- Type
- Default
0
idstring—
- Name
- Type
classNamestring | function—
- Name
- Description
CSS class applied to the element, or a function that returns a class based on the component’s state.
- Type
styleReact.CSSProperties | function—
- Name
- Description
Style applied to the element, or a function that returns a style object based on the component’s state.
- Type
renderReactElement | function—
- Name
- Description
Allows you to replace the component’s HTML element with a different tag, or compose it with another component.
Accepts a
ReactElementor a function that returns the element to render.- Type
Group
childrenReact.ReactNode—
- Name
- Description
The content of the component.
- Type
classNamestring | function—
- Name
- Description
CSS class applied to the element, or a function that returns a class based on the component’s state.
- Type
styleReact.CSSProperties | function—
- Name
- Description
Style applied to the element, or a function that returns a style object based on the component’s state.
- Type
renderReactElement | function—
- Name
- Description
Allows you to replace the component’s HTML element with a different tag, or compose it with another component.
Accepts a
ReactElementor a function that returns the element to render.- Type
FilterMenu.Group.StateHide
GroupLabel
An accessible label that is automatically associated with its parent group.
Renders a <div> element.
classNamestring | function—
- Name
- Description
CSS class applied to the element, or a function that returns a class based on the component’s state.
- Type
styleReact.CSSProperties | function—
- Name
- Description
Style applied to the element, or a function that returns a style object based on the component’s state.
- Type
renderReactElement | function—
- Name
- Description
Allows you to replace the component’s HTML element with a different tag, or compose it with another component.
Accepts a
ReactElementor a function that returns the element to render.- Type
FilterMenu.GroupLabel.PropsHide
Re-Export of GroupLabel props as FilterMenuGroupLabelProps
FilterMenu.GroupLabel.StateHide
RadioGroup
defaultValueany—
- Name
- Description
The uncontrolled value of the radio item that should be initially selected.
To render a controlled radio group, use the
valueprop instead.- Type
valueany—
- Name
- Description
The controlled value of the radio item that should be currently selected.
To render an uncontrolled radio group, use the
defaultValueprop instead.- Type
onValueChangefunction—
- Name
- Description
Function called when the selected value changes.
- Type
disabledbooleanfalse
- Name
- Description
Whether the component should ignore user interaction.
- Type
- Default
false
childrenReact.ReactNode—
- Name
- Description
The content of the component.
- Type
classNamestring | function—
- Name
- Description
CSS class applied to the element, or a function that returns a class based on the component’s state.
- Type
styleReact.CSSProperties | function—
- Name
- Description
Style applied to the element, or a function that returns a style object based on the component’s state.
- Type
renderReactElement | function—
- Name
- Description
Allows you to replace the component’s HTML element with a different tag, or compose it with another component.
Accepts a
ReactElementor a function that returns the element to render.- Type
FilterMenu.RadioGroup.PropsHide
Re-Export of RadioGroup props as FilterMenuRadioGroupProps
FilterMenu.RadioGroup.StateHide
FilterMenu.RadioGroup.ChangeEventReasonHide
FilterMenu.RadioGroup.ChangeEventDetailsHide
RadioItem
labelstring—
- Name
- Description
Overrides the text label to use when the item is matched during keyboard text navigation.
- Type
value*any—
- Name
- Description
Value of the radio item. This is the value that will be set in the MenuRadioGroup when the item is selected.
- Type
onClickfunction—
- Name
- Description
The click handler for the menu item.
- Type
closeOnClickbooleanfalse
- Name
- Description
Whether to close the menu when the item is clicked.
- Type
- Default
false
keywordsstring[]—
- Name
- Type
nativeButtonbooleanfalse
- Name
- Description
Whether the component renders a native
<button>element when replacing it via therenderprop. Set totrueif the rendered element is a native button.- Type
- Default
false
disabledbooleanfalse
- Name
- Description
Whether the component should ignore user interaction.
- Type
- Default
false
classNamestring | function—
- Name
- Description
CSS class applied to the element, or a function that returns a class based on the component’s state.
- Type
styleReact.CSSProperties | function—
- Name
- Description
Style applied to the element, or a function that returns a style object based on the component’s state.
- Type
renderReactElement | function—
- Name
- Description
Allows you to replace the component’s HTML element with a different tag, or compose it with another component.
Accepts a
ReactElementor a function that returns the element to render.- Type
FilterMenu.RadioItem.StateHide
RadioItemIndicator
Indicates whether the radio item is selected.
Renders a <span> element.
classNamestring | function—
- Name
- Description
CSS class applied to the element, or a function that returns a class based on the component’s state.
- Type
styleReact.CSSProperties | function—
- Name
- Description
Style applied to the element, or a function that returns a style object based on the component’s state.
- Type
keepMountedbooleanfalse
- Name
- Description
Whether to keep the HTML element in the DOM when the radio item is inactive.
- Type
- Default
false
renderReactElement | function—
- Name
- Description
Allows you to replace the component’s HTML element with a different tag, or compose it with another component.
Accepts a
ReactElementor a function that returns the element to render.- Type
FilterMenu.RadioItemIndicator.PropsHide
Re-Export of RadioItemIndicator props as FilterMenuRadioItemIndicatorProps
FilterMenu.RadioItemIndicator.StateHide
CheckboxItem
labelstring—
- Name
- Description
Overrides the text label to use when the item is matched during keyboard text navigation.
- Type
defaultCheckedbooleanfalse
- Name
- Description
Whether the checkbox item is initially ticked.
To render a controlled checkbox item, use the
checkedprop instead.- Type
- Default
false
checkedboolean—
- Name
- Description
Whether the checkbox item is currently ticked.
To render an uncontrolled checkbox item, use the
defaultCheckedprop instead.- Type
onCheckedChangefunction—
- Name
- Description
Event handler called when the checkbox item is ticked or unticked.
- Type
onClickfunction—
- Name
- Description
The click handler for the menu item.
- Type
closeOnClickbooleanfalse
- Name
- Description
Whether to close the menu when the item is clicked.
- Type
- Default
false
keywordsstring[]—
- Name
- Type
nativeButtonbooleanfalse
- Name
- Description
Whether the component renders a native
<button>element when replacing it via therenderprop. Set totrueif the rendered element is a native button.- Type
- Default
false
disabledbooleanfalse
- Name
- Description
Whether the component should ignore user interaction.
- Type
- Default
false
classNamestring | function—
- Name
- Description
CSS class applied to the element, or a function that returns a class based on the component’s state.
- Type
styleReact.CSSProperties | function—
- Name
- Description
Style applied to the element, or a function that returns a style object based on the component’s state.
- Type
renderReactElement | function—
- Name
- Description
Allows you to replace the component’s HTML element with a different tag, or compose it with another component.
Accepts a
ReactElementor a function that returns the element to render.- Type
FilterMenu.CheckboxItem.PropsHide
Re-Export of CheckboxItem props as FilterMenuCheckboxItemProps
FilterMenu.CheckboxItem.StateHide
FilterMenu.CheckboxItem.ChangeEventReasonHide
FilterMenu.CheckboxItem.ChangeEventDetailsHide
CheckboxItemIndicator
Indicates whether the checkbox item is ticked.
Renders a <span> element.
classNamestring | function—
- Name
- Description
CSS class applied to the element, or a function that returns a class based on the component’s state.
- Type
styleReact.CSSProperties | function—
- Name
- Description
Style applied to the element, or a function that returns a style object based on the component’s state.
- Type
keepMountedbooleanfalse
- Name
- Description
Whether to keep the HTML element in the DOM when the checkbox item is not checked.
- Type
- Default
false
renderReactElement | function—
- Name
- Description
Allows you to replace the component’s HTML element with a different tag, or compose it with another component.
Accepts a
ReactElementor a function that returns the element to render.- Type
FilterMenu.CheckboxItemIndicator.PropsHide
Re-Export of CheckboxItemIndicator props as FilterMenuCheckboxItemIndicatorProps
FilterMenu.CheckboxItemIndicator.StateHide
Separator
A separator element accessible to screen readers.
Renders a <div> element.
orientationOrientation'horizontal'
- Name
- Description
The orientation of the separator.
- Type
- Default
'horizontal'
classNamestring | function—
- Name
- Description
CSS class applied to the element, or a function that returns a class based on the component’s state.
- Type
styleReact.CSSProperties | function—
- Name
- Description
Style applied to the element, or a function that returns a style object based on the component’s state.
- Type
renderReactElement | function—
- Name
- Description
Allows you to replace the component’s HTML element with a different tag, or compose it with another component.
Accepts a
ReactElementor a function that returns the element to render.- Type
FilterMenu.Separator.StateHide
createHandle
Creates a new handle to connect a Menu.Root with detached Menu.Trigger components.
Return value
Handle
Controls a Menu imperatively and associates detached Menu.Trigger components with a Menu.Root.
Create one with Menu.createHandle() and pass it to the handle prop of the root and of any
triggers rendered outside of it.
The imperative methods take effect only while a root using this handle is mounted; calls made before a root attaches (or after it unmounts) are ignored.
Properties
isOpenbooleanreadonly
- Name
- Description
Whether the menu is currently open. Returns
falsewhile no root is attached to the handle.- Type
- Modifiers
readonly
Methods
open(triggerId)void
- Name
- Description
Opens the menu and associates it with the trigger with the given id.
This method should only be called in an event handler or an effect (not during rendering).
- Parameters
triggerId—ID of the trigger to associate with the menu. The trigger must be a matching
Menu.Triggerwith this handle passed as a prop.
- Returns
void
close()void
- Name
- Description
Closes the menu.
This method should only be called in an event handler or an effect (not during rendering).
- Returns
void