Skip to content

Autocomplete API

API reference docs for the React Autocomplete component. Learn about the props, CSS, and other APIs of this exported module.

Demos

For examples and details on the usage of this React component, visit the component demo pages:

Import

import Autocomplete from '@mui/joy/Autocomplete';
// or
import { Autocomplete } from '@mui/joy';
Learn about the difference by reading this guide on minimizing bundle size.

Props

Props of the native component are also available.

optionsRequired

aria-describedby

aria-label

aria-labelledby

autoFocus

clearIcon

clearText

closeText

color

defaultValue

disableClearable

disabled

endDecorator

error

filterOptions

forcePopupIcon

freeSolo

getLimitTagsText

getOptionDisabled

getOptionLabel

groupBy

id

inputValue

isOptionEqualToValue

limitTags

loading

loadingText

multiple

name

noOptionsText

onChange

onClose

onHighlightChange

onInputChange

onOpen

open

openText

placeholder

popupIcon

readOnly

renderGroup

renderOption

renderTags

required

size

slotProps

slots

startDecorator

sx

type

value

variant

The ref is forwarded to the root element.

Theme default props

You can use JoyAutocomplete to change the default props of this component with the theme.


Slots

To learn how to customize the slot, check out the Overriding component structure guide.

root

wrapper

input

startDecorator

endDecorator

clearIndicator

popupIndicator

listbox

option

loading

noOptions

limitTag

CSS classes

These class names are useful for styling with CSS. They are applied to the root slot when specific states are triggered.

.Mui-disabledSTATE

.Mui-errorSTATE

.Mui-focusedSTATE

.MuiAutocomplete-colorContext

.MuiAutocomplete-colorDanger

.MuiAutocomplete-colorNeutral

.MuiAutocomplete-colorPrimary

.MuiAutocomplete-colorSuccess

.MuiAutocomplete-colorWarning

.MuiAutocomplete-formControl

.MuiAutocomplete-hasClearIcon

.MuiAutocomplete-hasPopupIcon

.MuiAutocomplete-multiple

.MuiAutocomplete-popupIndicatorOpen

.MuiAutocomplete-sizeLg

.MuiAutocomplete-sizeMd

.MuiAutocomplete-sizeSm

.MuiAutocomplete-variantOutlined

.MuiAutocomplete-variantPlain

.MuiAutocomplete-variantSoft

.MuiAutocomplete-variantSolid