Use these primitives when ComboboxField does not fit your
layout or loading UI. They expose the control, popover, listbox, and option parts used by
ComboboxField.
ComboboxRoot owns the searchable single-select state. Put the control and popover inside it. Put
the text input and trigger in ComboboxControl, which draws the control chrome. Put the listbox and
its items in ComboboxPopover.
ComboboxInput opens the menu when someone clicks it and supplies the editable combobox input.
ComboboxTrigger toggles the option menu. ComboboxClearButton renders only when the root has a
selection and clears both the selection and input value.
Use ComboboxItem for options. It adds a checkmark for the selected option. ComboboxSection
groups related options and can render a heading. ComboboxListBox accepts static children or a
render function with items. Its loadMoreItem slot appends content after the main collection.
Set size on ComboboxRoot to give the control and option primitives a shared size. Individual
ComboboxControl, ComboboxInput, ComboboxClearButton, ComboboxTrigger, ComboboxItem, and
ComboboxLoadMoreItem components can override that size when necessary. ComboboxControl sizes a
nested Icon the same way TextInputControl does at the same control size.
ComboboxTray shows options in a full-screen tray. Pair it with ComboboxTrayTrigger to show the
current selection and open the tray. The tray dialog takes its accessible name from the root: a
connected label, or aria-label / aria-labelledby on ComboboxRoot.
Combobox primitives: Tray
Loading Combobox primitives: Tray example
Inside the tray, ComboboxInput is the search field. ComboboxClearButton clears the search and
the selection. ComboboxField chooses the tray or the popover for you.
ComboboxRoot defaults allowsEmptyCollection to true, so typing a filter that matches no
options keeps the tray open for empty states and custom values.
While the tray is closed, ComboboxTrayTrigger keeps constraint validation and form submission
working. Pass isRequired, validationBehavior, isDisabled, isReadOnly, form, and
allowsCustomValue on the root.
Set isRequired so a field blocks submit until someone chooses a value, or enters custom text when
allowsCustomValue is set. Set validationBehavior="aria" on the root to report validation through
ARIA instead of the constraint API.
The field submits under the root's name. By default that value is the selected key. Set
formValue="text", or set allowsCustomValue, to submit text instead — including a selected
option's label, or custom text that has no key. The search field does not submit, so the field sends
one value whether the tray is open or closed.
A read-only field still submits. So does a field with validationBehavior="aria". A disabled field
submits nothing in text mode. In key mode a disabled field still submits the selected key.
ComboboxPopover preserves the active Luke UI theme identity and explicit colour mode when it
portals the listbox. It portals a desktop-style positioned popover and never becomes a tray. Use
ComboboxTray for the tray presentation.
Give ComboboxRoot an accessible name with aria-label or a connected label. Keep the
root/control/input/listbox structure so React Aria's combobox semantics and keyboard behaviour
remain intact.
ComboboxRootProps also accepts compatible DOM and ARIA attributes and event handlers for its rendered element.
Name
Type
Default
allowsCustomValue
boolean
Default: —
Whether the ComboBox allows a non-item matching input value to be set.
allowsEmptyCollection
boolean | undefined
Default: true
Whether the menu can stay open when filtering leaves no items. Tray search and empty states
need this so typing text that matches nothing does not dismiss the overlay.
The filter function used to determine if an option should be included in the combo box list.
By default, a language-sensitive "contains" filter from useFilter is used.
defaultInputValue
string
Default: —
The default value of the ComboBox input (uncontrolled).
defaultItems
Iterable<T>
Default: —
The list of ComboBox items (uncontrolled).
disabledKeys
Iterable<Key>
Default: —
The item keys that are disabled. These items cannot be selected, focused, or otherwise
interacted with.
formValue
'text' | 'key'
Default: 'key'
Whether the text or key of the selected item is submitted as part of an HTML form. When
allowsCustomValue is true, this option does not apply and the text is always submitted.
inputId
string | undefined
Default: —
Element id for the combobox input. The root generates one when omitted.
inputValue
string
Default: —
The value of the ComboBox input (controlled).
items
Iterable<T>
Default: —
The list of ComboBox items (controlled).
menuTrigger
'focus'| 'input'| 'manual'
Default: 'focus'
The interaction required to display the ComboBox menu.
ComboboxClearButtonProps also accepts compatible DOM and ARIA attributes and event handlers for its rendered element.
Name
Type
Default
isPending
boolean
Default: —
Whether the button is in a pending state. This disables press and hover events
while retaining focusability, and announces the pending state to screen readers.
ComboboxTriggerProps also accepts compatible DOM and ARIA attributes and event handlers for its rendered element.
Name
Type
Default
isPending
boolean
Default: —
Whether the button is in a pending state. This disables press and hover events
while retaining focusability, and announces the pending state to screen readers.
ComboboxPopoverProps also accepts compatible DOM and ARIA attributes and event handlers for its rendered element.
Name
Type
Default
arrowBoundaryOffset
number
Default: 0
The minimum distance the arrow's edge should be from the edge of the overlay element.
arrowRef
RefObject<Element | null>
Default: —
A ref for the popover arrow element.
boundaryElement
Element
Default: document.body
Element that that serves as the positioning boundary.
containerPadding
number
Default: 12
The placement padding that should be applied between the element and its
surrounding container.
crossOffset
number
Default: 0
The additional offset applied along the cross axis between the element and its
anchor element.
defaultOpen
boolean
Default: —
Whether the overlay is open by default (uncontrolled).
getTargetRect
(target: Element) => DOMRect| null| undefined
Default: target.getBoundingClientRect()
Overrides the target element's bounding rectangle. Useful for positioning relative to
a specific point such as the mouse cursor (e.g. context menus) or text selection.
Parameters
target
The target element.
isEntering
boolean
Default: —
Whether the popover is currently performing an entry animation.
isExiting
boolean
Default: —
Whether the popover is currently performing an exit animation.
isKeyboardDismissDisabled
boolean
Default: false
Whether pressing the escape key to close the popover should be disabled.
Most popovers should not use this option. When set to true, an alternative
way to close the popover with a keyboard must be provided.
isNonModal
boolean
Default: —
Whether the popover is non-modal, i.e. elements outside the popover may be
interacted with by assistive technologies.
Most popovers should not use this option as it may negatively impact the screen
reader experience. Only use with components such as combobox, which are designed
to handle this situation carefully.
isOpen
boolean
Default: —
Whether the overlay is open by default (controlled).
maxHeight
number
Default: —
The maxHeight specified for the overlay element.
By default, it will take all space up to the current viewport height.
offset
number
Default: 8
The additional offset applied along the main axis between the element and its
anchor element.
placement
Placement
Default: 'bottom'
The placement of the element with respect to its anchor element.
scrollRef
RefObject<Element | null>
Default: overlayRef
A ref for the scrollable region within the overlay.
shouldCloseOnInteractOutside
(element: Element) => boolean
Default: —
When user interacts with the argument element outside of the popover ref,
return true if onClose should be called. This gives you a chance to filter
out interaction with elements that should not dismiss the popover.
By default, onClose will always be called on interaction outside the popover ref.
shouldFlip
boolean
Default: true
Whether the element should flip its orientation (e.g. top to bottom or left to right) when
there is insufficient room for it to render completely.
shouldSkipAnimation
boolean
Default: —
Whether the popover should appear and disappear without an entry or exit animation. This is
used by components such as PreviewTrigger to skip animations when quickly swapping between
overlays.
shouldUpdatePosition
boolean
Default: true
Whether the overlay should update its position automatically.
trigger
string
Default: —
The name of the component that triggered the popover. This is reflected on the element
as the data-trigger attribute, and can be used to provide specific
styles for the popover depending on which element triggered it.
triggerRef
RefObject<Element | null>
Default: —
The ref for the element which the popover positions itself with respect to.
When used within a trigger component such as DialogTrigger, MenuTrigger, Select, etc.,
this is set automatically. It is only required when used standalone.
ComboboxTrayTriggerProps also accepts compatible DOM and ARIA attributes and event handlers for its rendered element.
Name
Type
Default
isPending
boolean
Default: —
Whether the button is in a pending state. This disables press and hover events
while retaining focusability, and announces the pending state to screen readers.
ComboboxListBoxProps also accepts compatible DOM and ARIA attributes and event handlers for its rendered element.
Name
Type
Default
defaultSelectedKeys
'all' | Iterable<Key>
Default: —
The initial selected keys in the collection (uncontrolled).
dependencies
ReadonlyArray<unknown>
Default: —
Values that should invalidate the dynamic item cache.
disabledKeys
Iterable<Key>
Default: —
The item keys that are disabled. These items cannot be selected, focused, or otherwise
interacted with.
disallowEmptySelection
boolean
Default: —
Whether the collection allows empty selection.
dragAndDropHooks
DragAndDropHooks<NoInfer<T>>
Default: —
The drag and drop hooks returned by useDragAndDrop used to enable drag and drop behavior for
the ListBox.
escapeKeyBehavior
'clearSelection' | 'none'
Default: 'clearSelection'
Whether pressing the escape key should clear selection in the listbox or not.
Most experiences should not modify this option as it eliminates a keyboard user's ability to
easily clear selection. Only use if the escape key is being handled externally or should not
trigger selection clearing contextually.
items
Iterable<T>
Default: —
Dynamic items rendered by the children render prop.
layout
'stack' | 'grid'
Default: 'stack'
Whether the items are arranged in a stack or grid.
loadMoreItem
ReactNode
Default: —
Optional content appended after the main collection, e.g. a load-more sentinel.
orientation
Orientation
Default: 'vertical'
The primary orientation of the items. Usually this is the
direction that the collection scrolls.
renderEmptyState
(props: ListBoxRenderProps) => ReactNode
Default: —
Provides content to display when there are no items in the list.
selectedKeys
'all' | Iterable<Key>
Default: —
The currently selected keys in the collection (controlled).
selectionBehavior
SelectionBehavior
Default: 'toggle'
How multiple selection should behave in the collection.
selectionMode
SelectionMode
Default: —
The type of selection that is allowed in the collection.
shouldFocusOnHover
boolean
Default: —
Whether options should be focused when the user hovers over them.
shouldFocusWrap
boolean
Default: —
Whether focus should wrap around when the end/start is reached.
shouldSelectOnPressUp
boolean
Default: —
Whether selection should occur on press up instead of press down.
ComboboxLoadMoreItemProps also accepts compatible DOM and ARIA attributes and event handlers for its rendered element.
Name
Type
Default
isLoading
boolean
Default: —
Whether or not the loading spinner should be rendered or not.
scrollOffset
number
Default: 1
The amount of offset from the bottom of your scrollable region that should trigger load more.
Uses a percentage value relative to the scroll body's client height. Load more is then
triggered when your current scroll position's distance from the bottom of the currently loaded
list of items is less than or equal to the provided value. (e.g. 1 = 100% of the scroll
region's height).