Installation
npx shadcn@latest add @iconiq/b-autocompleteProps
Autocomplete
Root autocomplete controller. Compose AutocompleteInput, AutocompleteContent, AutocompleteList, and AutocompleteItem inside it.
itemsreadonly Item[]valuestringdefaultValuestringonValueChange(value: string) => voiditemToStringValue(item: Item) => stringmode"list" | "both" | "inline" | "none"Default "list"
autoHighlightboolean | "always"Default true
openbooleanonOpenChange(open: boolean, eventDetails) => voidopenOnInputClickbooleanDefault false
isItemEqualToValue(item: Item, value: Item) => booleanBuilt on Base UI Autocomplete with list filtering, keyboard navigation, and a sliding highlight treatment.
Radix UI does not ship a dedicated autocomplete primitive, so this install is Base UI only.
Pass value and onValueChange for controlled input text. The popup opens while typing by default, not on focus.
Object items require itemToStringValue. Use isItemEqualToValue if selection highlight behaves incorrectly.
AutocompleteInput
Styled input shell with border, focus ring, and optional clear control. The suggestion panel opens while typing, not on focus or click.
labelReact.ReactNodelabelClassNamestringplaceholderstringshowClearbooleanDefault true
showTriggerbooleanDefault false
disabledbooleanDefault false
AutocompleteContent
Portaled suggestion panel with a subtle fade-slide entrance and anchored width.
side"top" | "right" | "bottom" | "left"Default "bottom"
sideOffsetnumberDefault 6
AutocompleteList
Scrollable suggestion list rendered inside AutocompleteContent.
childrenReactNode | ((item, index) => ReactNode)Required
classNamestringAutocompleteItem
Suggestion row with optional description and a spring-driven highlight fill.
valueItemRequired
descriptionReactNodeRegistry bundle
Install the exact registry entry shown on the right when you want the component file and its declared runtime dependencies together.
Dependencies: @base-ui/react, motion, lucide-react.
This page documents the Base UI install only. Radix UI does not ship a dedicated autocomplete primitive.
The generated registry file is /r/b-autocomplete.json.