Menu
A button-triggered list of actions, with groups, submenus and filtering.
Usage guidelines
- Use
Menufor a list of commands that a button opens. UseContextMenufor the same actions on right-click, andSelectorComboboxwhen the user picks a value for a form or a filter. - Open the menu with a
MenuTriggerunder itsMenu. An icon-only trigger needs its ownaria-label; a tooltip on it is not its name. Add the target to the name, such as "More actions for Customer support bot", when a list repeats the same trigger. - Keep a dialog that a menu item opens as a sibling of the
Menu, not insideMenuContent. The item opens it through the dialog's handle:open(null)when the dialog already knows its target,openWithPayloadwhen the item supplies it. Do not keep an open flag in state for this. - Use
variant="destructive"for an item that deletes or removes, and set it apart with aMenuSeparator. - Use
MenuCheckboxItemandMenuRadioGroupfor view settings that apply as soon as they change, such as sorting a list. Keep the selection visible with the item indicators. - Wrap a long action list in
MenuFilterProviderand give theMenuInputa name. Put the items inMenuList, and place the separator between groups at the start of the laterMenuGroupso it hides with the groups that filtering removes.
Anatomy
A filterable menu wraps the root in MenuFilterProvider and fills MenuContent with MenuInputGroup (holding MenuInput and MenuClear), MenuEmpty and MenuList.
MenuContent bundles the portal, positioner and styled popup. Compose MenuPortal, MenuPositioner and MenuPopup only when the positioner needs props that MenuContent does not take.
Examples
Opening a dialog from an item
Each row has its own menu, and one AlertDialog serves the whole list. The Clear logs item calls openWithPayload on the dialog's handle with its app, and the dialog reads the payload of the session.
Customer support bot
Chatflow
Release notes writer
Workflow
Contract reviewer
Workflow
Checkbox and radio items
Radio items choose one option of a group and checkbox items toggle a setting. Both keep the menu open after a change, and controlling their state preserves the selection when the popup unmounts on close.
Submenu
MenuSubmenu nests a second MenuContent behind a MenuSubmenuTrigger, which shows the trailing arrow.
Filtering a long list
The input takes focus when the menu opens. Typing filters the items and hides groups without a match, and the arrow keys move the highlight while focus stays in the input.
Keyboard
| Key | Action |
|---|---|
| EnterorSpaceorDown arrow | Opens the menu from a focused trigger and focuses the first item. |
| Up arrow | Opens the menu from a focused trigger and focuses the last item. |
| Down arroworUp arrow | Moves focus between items, including disabled ones, and wraps at the ends. |
| HomeorEnd | Focuses the first or last item. |
| Printable characters | Focuses the next item whose label starts with the typed text. In a filterable menu, they type into the input instead. |
| EnterorSpace | Activates the focused item and closes the menu. Checkbox and radio items toggle and keep the menu open. |
| EnterorRight arrow | Opens the submenu of a focused submenu trigger and focuses its first item. |
| Left arrow | Closes the submenu and returns focus to its trigger. |
| Escape | Closes the innermost open menu. Closing the top menu returns focus to the trigger. |
| Tab | Closes the menu and moves focus to the control after the trigger. |
In a right-to-left layout, ArrowLeft opens a submenu and ArrowRight closes it. In a filterable menu, focus stays in the input while ArrowDown and ArrowUp move the highlight, and Enter activates the highlighted item.
API reference
Menu
Groups all parts of a dropdown menu supporting items, submenus, checkboxes, radios, and filtering. Doesn't render its own HTML element.
| Prop | Type | Default | Details |
|---|---|---|---|
defaultOpen | boolean | false | |
loopFocus | boolean | true | |
highlightItemOnHover | boolean | true | |
modal | boolean | true | |
onOpenChange | ((open: boolean, eventDetails: BaseMenu.Root.ChangeEventDetails) => void) | No default | |
onOpenChangeComplete | ((open: boolean) => void) | No default | |
onItemHighlighted | ((highlightedItem: HTMLElement | undefined, eventDetails: BaseMenu.Root.HighlightEventDetails) => void) | No default | |
open | boolean | No default | |
orientation | 'horizontal' | 'vertical' | 'vertical' | |
disabled | boolean | false | |
closeParentOnEsc | boolean | false | |
actionsRef | React.RefObject<MenuRootActions | null> | No default | |
triggerId | string | null | No default | |
defaultTriggerId | string | null | No default | |
handle | BaseMenu.Handle<Payload> | No default | |
children | PayloadChildRenderFunction<Payload> | React.ReactNode | No default | |
MenuCheckboxItem
A menu item that toggles a setting on or off. Renders a <div> element.
| Prop | Type | Default | Details |
|---|---|---|---|
className | string | ((state: MenuCheckboxItemState) => string | undefined) | No default | |
render | ComponentRenderFn<HTMLProps, MenuCheckboxItemState> | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | No default | |
style | React.CSSProperties | ((state: MenuCheckboxItemState) => React.CSSProperties | undefined) | No default | |
checked | boolean | No default | |
defaultChecked | boolean | false | |
onCheckedChange | ((checked: boolean, eventDetails: BaseMenu.CheckboxItem.ChangeEventDetails) => void) | No default | |
disabled | boolean | false | |
label | string | No default | |
id | string | No default | |
closeOnClick | boolean | false | |
nativeButton | boolean | false | |
| Attribute | Description |
|---|---|
data-checked | Present when the menu checkbox item is checked. |
data-unchecked | Present when the menu checkbox item is not checked. |
data-disabled | Present when the menu checkbox item is disabled. |
data-highlighted | Present when the menu checkbox item is highlighted. |
MenuCheckboxItemIndicator
Indicates whether the checkbox item is ticked. Renders a <span> element.
| Prop | Type | Default | Details |
|---|---|---|---|
className | string | ((state: MenuCheckboxItemIndicatorState) => string | undefined) | No default | |
render | ComponentRenderFn<HTMLProps, MenuCheckboxItemIndicatorState> | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | No default | |
style | React.CSSProperties | ((state: MenuCheckboxItemIndicatorState) => React.CSSProperties | undefined) | No default | |
keepMounted | boolean | false | |
| Attribute | Description |
|---|---|
data-checked | Present when the menu checkbox item is checked. |
data-unchecked | Present when the menu checkbox item is not checked. |
data-disabled | Present when the menu checkbox item is disabled. |
data-starting-style | Present when the indicator begins animating in. |
data-ending-style | Present when the indicator is animating out. |
MenuClear
A button that clears the input text. Requires the menu to be wrapped in Menu.FilterProvider. Renders a <button> element when the input has text.
| Prop | Type | Default | Details |
|---|---|---|---|
className | string | ((state: FilterDropdownClearState) => string | undefined) | No default | |
render | ComponentRenderFn<HTMLProps, FilterDropdownClearState> | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | No default | |
style | React.CSSProperties | ((state: FilterDropdownClearState) => React.CSSProperties | undefined) | No default | |
nativeButton | boolean | true | |
disabled | boolean | false | |
| Attribute | Description |
|---|---|
data-disabled | Present when the button is disabled. |
MenuContent
A styled menu popup bundled with a portal and positioner. Renders a <div> element.
| Prop | Type | Default | Details |
|---|---|---|---|
sideOffset | number | OffsetFunction | 4 | |
children required | React.ReactNode | No default | |
className | string | ((state: MenuPopupState) => string | undefined) | No default | |
render | ComponentRenderFn<HTMLProps, MenuPopupState> | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | No default | |
style | React.CSSProperties | ((state: MenuPopupState) => React.CSSProperties | undefined) | No default | |
id | string | No default | |
finalFocus | boolean | React.RefObject<HTMLElement | null> | ((closeType: InteractionType) => boolean | HTMLElement | null | void) | No default | |
alignOffset | number | OffsetFunction | 0 | |
align | 'center' | 'end' | 'start' | 'center' | |
side | 'bottom' | 'inline-end' | 'inline-start' | 'left' | 'right' | 'top' | 'bottom' | |
| Attribute | Description |
|---|---|
data-open | Present when the menu is open. |
data-closed | Present when the menu is closed. |
data-starting-style | Present when the menu begins animating in. |
data-ending-style | Present when the menu is animating out. |
data-side | Values: Indicates which side the popup is positioned relative to the anchor. |
data-align | Values: Indicates how the popup is aligned relative to specified side. |
data-instant | Values: Present if animations should be instant. |
| Variable | Description |
|---|---|
--available-width | Values: The available width between the anchor and the edge of the viewport. |
--available-height | Values: The available height between the anchor and the edge of the viewport. |
--anchor-width | Values: The anchor's width. |
--anchor-height | Values: The anchor's height. |
--transform-origin | Values: The coordinates that this element is anchored to. Used for animations and transitions. |
--positioner-width | Values: The width of the menu's positioner. It is important to set |
--positioner-height | Values: The height of the menu's positioner. It is important to set |
MenuEmpty
A message shown when the menu has no matching items. Requires the menu to be wrapped in Menu.FilterProvider. Renders a <div> element.
| Prop | Type | Default | Details |
|---|---|---|---|
className | string | ((state: FilterDropdownEmptyState) => string | undefined) | No default | |
render | ComponentRenderFn<HTMLProps, FilterDropdownEmptyState> | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | No default | |
style | React.CSSProperties | ((state: FilterDropdownEmptyState) => React.CSSProperties | undefined) | No default | |
MenuFilterProvider
Enables filtering for the menu or submenu it wraps. Add Menu.Input to the popup and place its items in Menu.List. Wrap each searchable submenu in its own provider. Doesn't render its own HTML element.
| Prop | Type | Default | Details |
|---|---|---|---|
children | React.ReactNode | No default | |
filter | ((text: string, query: string) => boolean) | null | No default | |
autoHighlight | 'always' | boolean | false | |
locale | Intl.LocalesArgument | No default | |
defaultValue | string | No default | |
value | string | No default | |
onValueChange | ((value: string, eventDetails: BaseMenu.FilterProvider.ChangeEventDetails) => void) | No default | |
MenuGroup
Groups related menu items with the corresponding label. Renders a <div> element.
| Prop | Type | Default | Details |
|---|---|---|---|
children | React.ReactNode | No default | |
className | string | ((state: MenuGroupState) => string | undefined) | No default | |
render | ComponentRenderFn<HTMLProps, MenuGroupState> | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | No default | |
style | React.CSSProperties | ((state: MenuGroupState) => React.CSSProperties | undefined) | No default | |
MenuGroupLabel
An accessible label that is automatically associated with its parent group. Renders a <div> element.
| Prop | Type | Default | Details |
|---|---|---|---|
className | string | ((state: MenuGroupLabelState) => string | undefined) | No default | |
render | ComponentRenderFn<HTMLProps, MenuGroupLabelState> | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | No default | |
style | React.CSSProperties | ((state: MenuGroupLabelState) => React.CSSProperties | undefined) | No default | |
MenuInput
A search field that filters the menu items. Requires the menu to be wrapped in Menu.FilterProvider. Renders an <input> element.
| Prop | Type | Default | Details |
|---|---|---|---|
className | string | ((state: FilterDropdownInputState) => string | undefined) | No default | |
render | ComponentRenderFn<HTMLProps, FilterDropdownInputState> | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | No default | |
style | React.CSSProperties | ((state: FilterDropdownInputState) => React.CSSProperties | undefined) | No default | |
| Attribute | Description |
|---|---|
data-highlighted | Present while the input shows its focus ring. Cleared when keyboard navigation highlights an item. |
MenuInputGroup
Wraps MenuInput and MenuClear on an InputGroup surface for filterable menus inside MenuFilterProvider. Renders a <div> element.
Accepts the props of the element it renders.
MenuItem
An individual interactive item in the menu. Renders a <div> element.
| Prop | Type | Default | Details |
|---|---|---|---|
variant | 'default' | 'destructive' | 'default' | |
disabled | boolean | false | |
label | string | No default | |
id | string | No default | |
closeOnClick | boolean | true | |
className | string | ((state: MenuItemState) => string | undefined) | No default | |
render | ComponentRenderFn<HTMLProps, MenuItemState> | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | No default | |
style | React.CSSProperties | ((state: MenuItemState) => React.CSSProperties | undefined) | No default | |
nativeButton | boolean | false | |
| Attribute | Description |
|---|---|
data-variant | Values: The item variant, set by the |
data-highlighted | Present when the menu item is highlighted. |
data-disabled | Present when the menu item is disabled. |
MenuLinkItem
A link in the menu that can be used to navigate to a different page or section. Renders an <a> element.
| Prop | Type | Default | Details |
|---|---|---|---|
variant | 'default' | 'destructive' | 'default' | |
closeOnClick | boolean | true | |
className | string | ((state: MenuLinkItemState) => string | undefined) | No default | |
render | ComponentRenderFn<React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, MenuLinkItemState> | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | No default | |
style | React.CSSProperties | ((state: MenuLinkItemState) => React.CSSProperties | undefined) | No default | |
label | string | No default | |
id | string | No default | |
| Attribute | Description |
|---|---|
data-variant | Values: The item variant, set by the |
data-highlighted | Present when the link is highlighted. |
MenuList
Groups menu items so other content, such as a filter input, can share the popup. Renders a <div> element.
| Prop | Type | Default | Details |
|---|---|---|---|
className | string | ((state: MenuListState) => string | undefined) | No default | |
render | ComponentRenderFn<HTMLProps, MenuListState> | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | No default | |
style | React.CSSProperties | ((state: MenuListState) => React.CSSProperties | undefined) | No default | |
MenuPopup
A container for the menu items. Renders a <div> element.
| Prop | Type | Default | Details |
|---|---|---|---|
children | React.ReactNode | No default | |
id | string | No default | |
finalFocus | boolean | React.RefObject<HTMLElement | null> | ((closeType: InteractionType) => boolean | HTMLElement | null | void) | No default | |
className | string | ((state: MenuPopupState) => string | undefined) | No default | |
render | ComponentRenderFn<HTMLProps, MenuPopupState> | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | No default | |
style | React.CSSProperties | ((state: MenuPopupState) => React.CSSProperties | undefined) | No default | |
| Attribute | Description |
|---|---|
data-open | Present when the menu is open. |
data-closed | Present when the menu is closed. |
data-starting-style | Present when the menu begins animating in. |
data-ending-style | Present when the menu is animating out. |
data-side | Values: Indicates which side the popup is positioned relative to the anchor. |
data-align | Values: Indicates how the popup is aligned relative to specified side. |
data-instant | Values: Present if animations should be instant. |
MenuPortal
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.
| Prop | Type | Default | Details |
|---|---|---|---|
keepMounted | boolean | false | |
container | HTMLElement | React.RefObject<HTMLElement | ShadowRoot | null> | ShadowRoot | null | No default | |
className | string | ((state: MenuPortalState) => string | undefined) | No default | |
render | ComponentRenderFn<HTMLProps, MenuPortalState> | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | No default | |
style | React.CSSProperties | ((state: MenuPortalState) => React.CSSProperties | undefined) | No default | |
MenuPositioner
Positions the menu popup against the trigger. Renders a <div> element.
| Prop | Type | Default | Details |
|---|---|---|---|
className | string | ((state: MenuPositionerState) => string | undefined) | No default | |
align | 'center' | 'end' | 'start' | 'center' | |
side | 'bottom' | 'inline-end' | 'inline-start' | 'left' | 'right' | 'top' | 'bottom' | |
render | ComponentRenderFn<HTMLProps, MenuPositionerState> | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | No default | |
style | React.CSSProperties | ((state: MenuPositionerState) => React.CSSProperties | undefined) | No default | |
anchor | Element | React.RefObject<Element | null> | VirtualElement | (() => Element | VirtualElement | null) | null | No default | |
positionMethod | 'absolute' | 'fixed' | 'absolute' | |
sideOffset | number | OffsetFunction | 0 | |
alignOffset | number | OffsetFunction | 0 | |
collisionBoundary | Boundary | 'clipping-ancestors' | |
collisionPadding | Padding | 5 | |
sticky | boolean | false | |
arrowPadding | number | 5 | |
disableAnchorTracking | boolean | false | |
collisionAvoidance | CollisionAvoidance | No default | |
| Attribute | Description |
|---|---|
data-open | Present when the menu popup is open. |
data-closed | Present when the menu popup is closed. |
data-anchor-hidden | Present when the anchor is hidden. |
data-side | Values: Indicates which side the popup is positioned relative to the anchor. |
data-align | Values: Indicates how the popup is aligned relative to the specified side. |
| Variable | Description |
|---|---|
--available-width | Values: The available width between the anchor and the edge of the viewport. |
--available-height | Values: The available height between the anchor and the edge of the viewport. |
--anchor-width | Values: The anchor's width. |
--anchor-height | Values: The anchor's height. |
--transform-origin | Values: The coordinates that this element is anchored to. Used for animations and transitions. |
--positioner-width | Values: The width of the menu's positioner. It is important to set |
--positioner-height | Values: The height of the menu's positioner. It is important to set |
MenuRadioGroup
Groups related radio items. Renders a <div> element.
| Prop | Type | Default | Details |
|---|---|---|---|
defaultValue | Value | No default | |
onValueChange | ((value: Value, eventDetails: MenuRadioGroupChangeEventDetails) => void) | No default | |
value | Value | No default | |
className | string | ((state: MenuRadioGroupState) => string | undefined) | No default | |
render | ComponentRenderFn<HTMLProps, MenuRadioGroupState> | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | No default | |
style | React.CSSProperties | ((state: MenuRadioGroupState) => React.CSSProperties | undefined) | No default | |
children | React.ReactNode | No default | |
disabled | boolean | false | |
| Attribute | Description |
|---|---|
data-disabled | Whether the component is disabled. |
MenuRadioItem
A menu item that works like a radio button in a given group. Renders a <div> element.
| Prop | Type | Default | Details |
|---|---|---|---|
value required | Value | No default | |
className | string | ((state: MenuRadioItemState) => string | undefined) | No default | |
render | ComponentRenderFn<HTMLProps, MenuRadioItemState> | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | No default | |
style | React.CSSProperties | ((state: MenuRadioItemState) => React.CSSProperties | undefined) | No default | |
nativeButton | boolean | false | |
disabled | boolean | false | |
label | string | No default | |
id | string | No default | |
closeOnClick | boolean | false | |
| Attribute | Description |
|---|---|
data-checked | Present when the menu radio item is selected. |
data-unchecked | Present when the menu radio item is not selected. |
data-disabled | Present when the menu radio item is disabled. |
data-highlighted | Present when the menu radio item is highlighted. |
MenuRadioItemIndicator
Indicates whether the radio item is selected. Renders a <span> element.
| Prop | Type | Default | Details |
|---|---|---|---|
className | string | ((state: MenuRadioItemIndicatorState) => string | undefined) | No default | |
render | ComponentRenderFn<HTMLProps, MenuRadioItemIndicatorState> | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | No default | |
style | React.CSSProperties | ((state: MenuRadioItemIndicatorState) => React.CSSProperties | undefined) | No default | |
keepMounted | boolean | false | |
| Attribute | Description |
|---|---|
data-checked | Present when the menu radio item is selected. |
data-unchecked | Present when the menu radio item is not selected. |
data-disabled | Present when the menu radio item is disabled. |
data-starting-style | Present when the radio indicator begins animating in. |
data-ending-style | Present when the radio indicator is animating out. |
MenuSeparator
A separator element accessible to screen readers. Renders a <div> element.
| Prop | Type | Default | Details |
|---|---|---|---|
orientation | 'horizontal' | 'vertical' | 'horizontal' | |
className | string | ((state: SeparatorState) => string | undefined) | No default | |
render | ComponentRenderFn<HTMLProps, SeparatorState> | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | No default | |
style | React.CSSProperties | ((state: SeparatorState) => React.CSSProperties | undefined) | No default | |
| Attribute | Description |
|---|---|
data-orientation | Values: Indicates the orientation of the separator. |
MenuSubmenu
Groups all parts of a submenu. Doesn't render its own HTML element.
| Prop | Type | Default | Details |
|---|---|---|---|
onOpenChange | ((open: boolean, eventDetails: BaseMenu.SubmenuRoot.ChangeEventDetails) => void) | No default | |
closeParentOnEsc | boolean | false | |
children | React.ReactNode | No default | |
defaultOpen | boolean | false | |
loopFocus | boolean | true | |
highlightItemOnHover | boolean | true | |
onOpenChangeComplete | ((open: boolean) => void) | No default | |
onItemHighlighted | ((highlightedItem: HTMLElement | undefined, eventDetails: BaseMenu.Root.HighlightEventDetails) => void) | No default | |
open | boolean | No default | |
orientation | 'horizontal' | 'vertical' | 'vertical' | |
disabled | boolean | false | |
actionsRef | React.RefObject<MenuRootActions | null> | No default | |
MenuSubmenuTrigger
A menu item that opens a submenu. Renders a <div> element.
| Prop | Type | Default | Details |
|---|---|---|---|
variant | 'default' | 'destructive' | 'default' | |
className | string | ((state: MenuSubmenuTriggerState) => string | undefined) | No default | |
label | string | No default | |
id | string | No default | |
disabled | boolean | false | |
delay | number | 100 | |
closeDelay | number | 0 | |
openOnHover | boolean | true | |
render | ComponentRenderFn<HTMLProps, MenuSubmenuTriggerState> | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | No default | |
style | React.CSSProperties | ((state: MenuSubmenuTriggerState) => React.CSSProperties | undefined) | No default | |
nativeButton | boolean | false | |
| Attribute | Description |
|---|---|
data-variant | Values: The item variant, set by the |
data-popup-open | Present when the corresponding submenu is open. |
data-highlighted | Present when the submenu trigger is highlighted. |
data-disabled | Present when the submenu trigger is disabled. |
MenuTrigger
A button that opens the menu. Renders a <button> element.
| Prop | Type | Default | Details |
|---|---|---|---|
className | string | ((state: MenuTriggerState) => string | undefined) | No default | |
children | React.ReactNode | No default | |
disabled | boolean | false | |
handle | BaseMenu.Handle<Payload> | No default | |
payload | Payload | No default | |
delay | number | 100 | |
closeDelay | number | 0 | |
openOnHover | boolean | No default | |
render | ComponentRenderFn<HTMLProps, MenuTriggerState> | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | No default | |
style | React.CSSProperties | ((state: MenuTriggerState) => React.CSSProperties | undefined) | No default | |
nativeButton | boolean | true | |
| Attribute | Description |
|---|---|
data-popup-open | Present when the corresponding menu is open. |
data-pressed | Present when the trigger is pressed. |
data-disabled | Present when the trigger is disabled. |
createMenuHandle
Creates a new handle to connect a Menu.Root with detached Menu.Trigger components.
Returns
BaseMenu.Handle<Payload>| Member | Type | Description |
|---|---|---|
open required | (triggerId: string) => void | 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). |
close required | () => void | Closes the menu. This method should only be called in an event handler or an effect (not during rendering). |
isOpen required | boolean | Whether the menu is currently open. Returns |
useMenuFilter
| Parameter | Type | Description |
|---|---|---|
options | GetFilterParameters | No description |
Returns
Filter| Member | Type | Description |
|---|---|---|
contains required | <Item>(item: Item, query: string, itemToString?: (item: Item) => string) => boolean | Returns whether the item matches the query anywhere. |
startsWith required | <Item>(item: Item, query: string, itemToString?: (item: Item) => string) => boolean | Returns whether the item starts with the query. |
endsWith required | <Item>(item: Item, query: string, itemToString?: (item: Item) => string) => boolean | Returns whether the item ends with the query. |