Form Inputs
Autocomplete
Free-text input with filtered suggestions.
Free-text input with filtered suggestions.
Suggestions#
Inline completion#
Disabled#
Component props#
items accepts unique strings. Users can enter a value that is absent from the suggestions.
| Prop | Type | Purpose |
|---|---|---|
items | readonly string[] | Suggestions to filter and display |
label | ReactNode | Accessible input label |
value / defaultValue | string | Controlled or initial text |
onChange | (value: string) => void | Receives edits and chosen suggestions |
onValueChange | Base UI callback | Receives the value and cancellable event details |
isDisabled | boolean | Disables the input |
mode | 'list' | 'both' | 'inline' | 'none' | Filtering and inline completion behavior |
inputProps | Base UI Input props | Input attributes, including aria-label when no label is shown |
positionerProps | Base UI Positioner props | Popup placement |
renderItem | (item: string) => ReactNode | Custom suggestion content |
emptyMessage | ReactNode | Content shown when no suggestions match |
The forwarded ref targets the input. Other Base UI Autocomplete root props are supported, including open, onOpenChange, filter, and readOnly.
