Examples
Default
Error State
Sizes
Multi Select
Clearable
Props
Autocomplete
A combobox input with single- or multi-select, optional async loading, and native support for grouped + pinned options.- Pass
groupsplus anoptionsarray whose entries reference each group viagroupIdto render hierarchical lists with properrole="group"+aria-labelledbysemantics. Options without agroupIdrender above the first group; options markedpinnedrender above everything and bypass the search filter. - Indentation of nested rows (e.g. price under product) is controlled by the consumer via
renderOptionstyling — there is no built-in indent.
Ordered list of groups. When provided, options whose
groupId matches an entry render under the corresponding heading. Groups with no visible (post-filter) options collapse silently. Pinned options render above everything; ungrouped options render between pinned and the first group. Only one level of grouping is supported.Custom renderer for group headings. The returned node is wrapped by the component in an element carrying the
id referenced by the surrounding role="group" wrapper’s aria-labelledby, so consumers only need to return visual content.Custom content for each option row. Under the v2 palette a selected row is inverted: the content and icon tokens inside it switch to their inverted values, so text and icons follow. Anything that brings its own surface, such as a
Chip or Badge, keeps its fill and should not rely on the row’s text colour.Full type: ((option: AutocompleteOption, state: { selected: boolean; active: boolean; }) => ReactNode).Exported types
Also exported from@fanvue/ui: AutocompleteGroup, AutocompleteOption, AutocompleteProps, AutocompleteSize.
Setup: Installation · Theming