Skip to content
GitHub

Autocomplete

Displays a searchable list of options to choose from.

Installation

Usage

Controlled

Control the selected value with value and onValueChange props. Use inputValue and onInputValueChange for controlling the input text.

Selected: banana

Sizes

Small

Medium

Large

State

Invalid

Disabled

Examples

Inline autocomplete

Autofill the input with the highlighted item while navigating with arrow keys.

Group

With Field

Use Autocomplete with <Field /> components to style with the field components.

We'll use this for shipping estimates

With clear button

Pass showClear to <AutocompleteInput /> to show a clear button.

With trigger

Pass showTrigger to <AutocompleteInput /> to show the dropdown trigger button.

With start icon

API Reference

Autocomplete

Combines input, dropdown trigger, and list into a searchable select.

AutocompleteInput

Text input with optional dropdown trigger and clear button. Supports size variants.

AutocompleteContent

Dropdown that displays filtered suggestions. Portaled to overlay other content.

AutocompleteItem

Single selectable option in the suggestion list. Pass item from the collection.

AutocompleteGroup

Groups related items. Use with groupBy on the collection.

AutocompleteGroupLabel

Heading for a group of items. Use inside AutocompleteGroup.

AutocompleteEmpty

Content when no items match the filter. Default: "No results found."

AutocompleteControl / AutocompleteTrigger / AutocompleteClear

Optional building blocks for custom layouts. Use AutocompleteInput for the standard layout.


For a complete list of props, see the Ark UI documentation.