
Premium solid combobox with full primitive part coverage, chips, filtering hooks, grouping, status, and portal positioning.
npx shadcn@latest add https://ui.edbn.me/api/analytics/registry/combobox.jsonGroups every Autocomplete part and owns value, filtering, highlighting, form, popup, and inline completion state. It does not render an element.
itemsreadonly Item[] | readonly Group[]Items or grouped items used by the list.
filteredItemsreadonly Item[] | readonly Group[]Externally filtered items to render instead of internal filtering.
filterAutocompleteFilter<Item> | nullCustom item matching function. Pass null to disable internal filtering.
mode'list' | 'both' | 'inline' | 'none''list'Controls list filtering and inline completion behavior.
defaultValuestringInitial uncontrolled input value.
valuestringControlled input value.
defaultOpenbooleanfalseInitial uncontrolled popup open state.
openbooleanControlled popup open state.
openOnInputClickbooleanfalseWhether clicking the input opens the popup.
autoHighlightboolean | 'always'falseWhether the first matching item is highlighted automatically.
keepHighlightbooleanfalseWhether highlighted state is kept when the pointer leaves the list.
highlightItemOnHoverbooleantrueWhether pointer hover highlights items.
loopFocusbooleantrueWhether arrow-key navigation loops between the input and list.
gridbooleanfalseEnables grid-style item navigation using Row parts.
inlinebooleanfalseRenders the list inline without a popup.
virtualizedbooleanfalseMarks the list as externally virtualized.
limitnumber-1Maximum number of matching items to display.
localeIntl.LocalesArgumentruntime localeLocale used by the default string comparison.
modalbooleanfalseWhen true, outside interaction and page scroll are limited while open.
submitOnItemClickbooleanfalseWhether choosing an item submits the owning form.
itemToStringValue(item) => stringConverts object item values to the input and form value string.
actionsRefReact.RefObject<{ unmount: () => void }>Imperative actions for manually unmounting after external animation.
childrenReact.ReactNodeAutocomplete parts.
onValueChange(value, eventDetails) => voidCalled when the input value changes.
onOpenChange(open, eventDetails) => voidCalled when the popup opens or closes.
onOpenChangeComplete(open) => voidCalled after open or close animations complete.
onItemHighlighted(item, eventDetails) => voidCalled when the highlighted item changes.
namestringName for the internal form input.
formstringId of the form that owns the internal input.
idstringId used as the component id base.
inputRefReact.Ref<HTMLInputElement>Ref for the internal input element.
requiredbooleanfalseMarks the form field as required.
disabledbooleanfalseDisables user interaction.
readOnlybooleanfalsePrevents user edits while preserving value display.
Wraps the input and field controls. Renders a div element.
classNamestring | ((state) => string)Class names applied to the rendered element.
styleReact.CSSProperties | ((state) => React.CSSProperties)Inline styles applied to the rendered element.
renderReactElement | ((props, state) => ReactElement)Custom render target while preserving Base UI behavior.
| Attribute | Description |
|---|---|
| data-popup-open | Present when the popup is open. |
| data-popup-side | Indicates the side where the popup is positioned. |
| data-list-empty | Present when the filtered list has no items. |
| data-disabled | Present when disabled. |
| data-readonly | Present when read-only. |
| data-valid | Present when the field is valid. |
| data-invalid | Present when the field is invalid. |
| data-touched | Present after the field is touched. |
| data-dirty | Present after the value changes. |
| data-filled | Present when the field has a value. |
| data-focused | Present when the field has focus. |
The text input used to search, filter, and complete items. Renders an input element.
disabledbooleanfalseDisables the input.
classNamestring | ((state) => string)Class names applied to the rendered element.
styleReact.CSSProperties | ((state) => React.CSSProperties)Inline styles applied to the rendered element.
renderReactElement | ((props, state) => ReactElement)Custom render target while preserving Base UI behavior.
| Attribute | Description |
|---|---|
| data-popup-open | Present when the popup is open. |
| data-popup-side | Indicates the side where the popup is positioned. |
| data-list-empty | Present when the filtered list has no items. |
| data-disabled | Present when disabled. |
| data-readonly | Present when read-only. |
| data-valid | Present when the field is valid. |
| data-invalid | Present when the field is invalid. |
| data-touched | Present after the field is touched. |
| data-dirty | Present after the value changes. |
| data-filled | Present when the field has a value. |
| data-focused | Present when the field has focus. |
| data-required | Present when required. |
A button that opens or closes the popup. Renders a button element.
disabledbooleanfalseDisables the trigger.
nativeButtonbooleantrueWhen false, the part renders with non-native button semantics.
renderReactElement | ((props, state) => ReactElement)Custom render target while preserving Base UI behavior.
classNamestring | ((state) => string)Class names applied to the rendered element.
styleReact.CSSProperties | ((state) => React.CSSProperties)Inline styles applied to the rendered element.
| Attribute | Description |
|---|---|
| data-popup-open | Present when the popup is open. |
| data-popup-side | Indicates the side where the popup is positioned. |
| data-list-empty | Present when the filtered list has no items. |
| data-disabled | Present when disabled. |
| data-readonly | Present when read-only. |
| data-valid | Present when the field is valid. |
| data-invalid | Present when the field is invalid. |
| data-touched | Present after the field is touched. |
| data-dirty | Present after the value changes. |
| data-filled | Present when the field has a value. |
| data-focused | Present when the field has focus. |
| data-required | Present when required. |
An icon slot associated with the field. Renders a span element.
classNamestring | ((state) => string)Class names applied to the rendered element.
styleReact.CSSProperties | ((state) => React.CSSProperties)Inline styles applied to the rendered element.
renderReactElement | ((props, state) => ReactElement)Custom render target while preserving Base UI behavior.
A button that clears the current input value. Renders a button element.
disabledbooleanfalseDisables the clear button.
keepMountedbooleanfalseKeeps the clear button mounted while hidden.
nativeButtonbooleantrueWhen false, the part renders with non-native button semantics.
renderReactElement | ((props, state) => ReactElement)Custom render target while preserving Base UI behavior.
classNamestring | ((state) => string)Class names applied to the rendered element.
styleReact.CSSProperties | ((state) => React.CSSProperties)Inline styles applied to the rendered element.
| Attribute | Description |
|---|---|
| data-visible | Present when the clear button is visible. |
| data-starting-style | Present before the clear transition starts. |
| data-ending-style | Present while the clear transition ends. |
Reads the current input value for custom rendering. It does not render its own element.
childrenReact.ReactNode | ((value: string) => React.ReactNode)Content or render function receiving the current value.
Moves the popup subtree to another DOM container. Renders a div element.
containerHTMLElement | RefObject | nulldocument.bodyContainer where the portal is mounted.
keepMountedbooleanfalseKeeps the portal mounted while the popup is closed.
classNamestring | ((state) => string)Class names applied to the rendered element.
styleReact.CSSProperties | ((state) => React.CSSProperties)Inline styles applied to the rendered element.
renderReactElement | ((props, state) => ReactElement)Custom render target while preserving Base UI behavior.
Optional overlay rendered beneath the popup. Renders a div element.
classNamestring | ((state) => string)Class names applied to the rendered element.
styleReact.CSSProperties | ((state) => React.CSSProperties)Inline styles applied to the rendered element.
renderReactElement | ((props, state) => ReactElement)Custom render target while preserving Base UI behavior.
| Attribute | Description |
|---|---|
| data-open | Present when the popup is open. |
| data-closed | Present when the popup is closed. |
| data-starting-style | Present before the backdrop transition starts. |
| data-ending-style | Present while the backdrop transition ends. |
Positions the popup against the input group or a custom anchor. Renders a div element.
anchorElement | VirtualElement | RefObject | (() => Element | null)triggerAnchor used for popup positioning.
positionMethod'absolute' | 'fixed''absolute'CSS position strategy for the popup.
side'top' | 'bottom' | 'left' | 'right' | 'inline-start' | 'inline-end''bottom'Preferred side of the anchor.
sideOffsetnumber | OffsetFunction0Distance between anchor and popup.
align'start' | 'center' | 'end''center'Popup alignment on the chosen side.
alignOffsetnumber | OffsetFunction0Offset along the alignment axis.
collisionBoundary'clipping-ancestors' | Element | Element[] | Rect'clipping-ancestors'Boundary used for collision detection.
collisionPaddingPadding5Space kept between popup and collision boundary.
collisionAvoidanceCollisionAvoidanceHow side and alignment collisions are corrected.
stickybooleanfalseKeeps the popup visible when the anchor scrolls out of view.
arrowPaddingnumber5Minimum distance between arrow and popup edges.
disableAnchorTrackingbooleanfalseDisables tracking anchor layout shifts.
classNamestring | ((state) => string)Class names applied to the rendered element.
styleReact.CSSProperties | ((state) => React.CSSProperties)Inline styles applied to the rendered element.
renderReactElement | ((props, state) => ReactElement)Custom render target while preserving Base UI behavior.
| Attribute | Description |
|---|---|
| data-open | Present when the popup is open. |
| data-closed | Present when the popup is closed. |
| data-side | Indicates the resolved popup side. |
| data-align | Indicates the resolved popup alignment. |
| data-empty | Present when no items are shown. |
| data-anchor-hidden | Present when the anchor is hidden. |
| Variable | Description |
|---|---|
| --anchor-height | Measured anchor height. |
| --anchor-width | Measured anchor width. |
| --available-height | Available height before collision. |
| --available-width | Available width before collision. |
| --transform-origin | Origin point for transform animations. |
Container for the suggestion list. Renders a div element.
initialFocusboolean | RefObject | ((openType) => HTMLElement | boolean | null)Element to focus when the popup opens.
finalFocusboolean | RefObject | ((closeType) => HTMLElement | boolean | null)Element to focus when the popup closes.
classNamestring | ((state) => string)Class names applied to the rendered element.
styleReact.CSSProperties | ((state) => React.CSSProperties)Inline styles applied to the rendered element.
renderReactElement | ((props, state) => ReactElement)Custom render target while preserving Base UI behavior.
| Attribute | Description |
|---|---|
| data-open | Present when the popup is open. |
| data-closed | Present when the popup is closed. |
| data-side | Indicates the resolved popup side. |
| data-align | Indicates the resolved popup alignment. |
| data-empty | Present when no items are shown. |
| data-starting-style | Present before the popup transition starts. |
| data-ending-style | Present while the popup transition ends. |
| data-instant | Present when transitions should be skipped. |
Displays an element positioned toward the anchor. Renders a div element.
classNamestring | ((state) => string)Class names applied to the rendered element.
styleReact.CSSProperties | ((state) => React.CSSProperties)Inline styles applied to the rendered element.
renderReactElement | ((props, state) => ReactElement)Custom render target while preserving Base UI behavior.
| Attribute | Description |
|---|---|
| data-open | Present when the popup is open. |
| data-closed | Present when the popup is closed. |
| data-side | Indicates the resolved popup side. |
| data-align | Indicates the resolved popup alignment. |
| data-uncentered | Present when the arrow cannot be centered on the anchor. |
A polite live region for status text. Renders a div element and should stay mounted.
classNamestring | ((state) => string)Class names applied to the rendered element.
styleReact.CSSProperties | ((state) => React.CSSProperties)Inline styles applied to the rendered element.
renderReactElement | ((props, state) => ReactElement)Custom render target while preserving Base UI behavior.
Renders its children when the filtered list is empty. Renders a div element.
classNamestring | ((state) => string)Class names applied to the rendered element.
styleReact.CSSProperties | ((state) => React.CSSProperties)Inline styles applied to the rendered element.
renderReactElement | ((props, state) => ReactElement)Custom render target while preserving Base UI behavior.
Container for filtered items. Renders a div element.
childrenReact.ReactNode | ((item, index) => React.ReactNode)Static content or an item render function.
renderReactElement | ((props, state) => ReactElement)Custom render target while preserving Base UI behavior.
classNamestring | ((state) => string)Class names applied to the rendered element.
styleReact.CSSProperties | ((state) => React.CSSProperties)Inline styles applied to the rendered element.
| Attribute | Description |
|---|---|
| data-empty | Present when the list is empty. |
A row of items for grid mode. Renders a div element.
classNamestring | ((state) => string)Class names applied to the rendered element.
styleReact.CSSProperties | ((state) => React.CSSProperties)Inline styles applied to the rendered element.
renderReactElement | ((props, state) => ReactElement)Custom render target while preserving Base UI behavior.
An item in the autocomplete list. Renders a div element.
valueanynullUnique value for this item.
indexnumberOptional list index used to avoid DOM index lookup.
disabledbooleanfalseDisables the item.
onClickMouseEventHandlerCalled when the item is selected by pointer or keyboard.
childrenReact.ReactNodeItem content.
nativeButtonbooleantrueWhen false, the part renders with non-native button semantics.
renderReactElement | ((props, state) => ReactElement)Custom render target while preserving Base UI behavior.
classNamestring | ((state) => string)Class names applied to the rendered element.
styleReact.CSSProperties | ((state) => React.CSSProperties)Inline styles applied to the rendered element.
| Attribute | Description |
|---|---|
| data-highlighted | Present when the item is highlighted. |
| data-disabled | Present when the item is disabled. |
Accessible separator between list sections. Renders a div element.
orientation'horizontal' | 'vertical''horizontal'Separator orientation.
classNamestring | ((state) => string)Class names applied to the rendered element.
styleReact.CSSProperties | ((state) => React.CSSProperties)Inline styles applied to the rendered element.
renderReactElement | ((props, state) => ReactElement)Custom render target while preserving Base UI behavior.
Groups related items with a label. Renders a div element.
itemsreadonly Item[]Items rendered by child Collection parts.
classNamestring | ((state) => string)Class names applied to the rendered element.
styleReact.CSSProperties | ((state) => React.CSSProperties)Inline styles applied to the rendered element.
renderReactElement | ((props, state) => ReactElement)Custom render target while preserving Base UI behavior.
Label for a grouped item section. Renders a div element.
classNamestring | ((state) => string)Class names applied to the rendered element.
styleReact.CSSProperties | ((state) => React.CSSProperties)Inline styles applied to the rendered element.
renderReactElement | ((props, state) => ReactElement)Custom render target while preserving Base UI behavior.
Renders filtered items from the nearest Root or Group. It does not render an element.
children(item, index) => React.ReactNodeRequiredRender function for each filtered item.
Base UI hook used to create locale-aware filters for controlled filtering.
optionsAutocompleteFilterOptionsFilter options such as locale and sensitivity.
returnsAutocompleteFilterFilter function compatible with Root filter or external filtering.
Base UI hook used to filter flat or grouped item arrays outside Root.
itemsreadonly Item[] | readonly Group[]Items to filter.
filterAutocompleteFilter | nullFilter function to apply.
querystringCurrent query value.
limitnumber-1Maximum number of items to return.
returnsreadonly Item[] | readonly Group[]Filtered items for Root filteredItems.