Combobox
A combobox is a form element that allows the user to select one or more options from a set of choices.
HeadlessUI Combobox DocumentationImport
Usage
Create an array of anything you want to use as options. For these examples, we’ll use an array of objects with label
and value
keys.
Single
Single combobox allows only one item to be selected at a time.
Multiple
Multiple combobox allows multiple items to be selected at a time. Use the multiple
prop to enable this feature.
Houston, TX Los Angeles, CA
Styling states
You can style the selected
and focused
states by using data attributes. For example:
Read more about styling states. Note: You can not style via render props at this time.
Props
API Interface: ComboboxProps
API Interface: ComboboxOptionProps
API Interface: ComboboxOptionsProps
API Interface: ComboboxInputProps