Combobox
unreleasedstable
A searchable input and listbox popup for selecting an option.
import {
Combobox,
ComboboxContent,
ComboboxInput,
ComboboxItem,
ComboboxListbox,
} from "@/components/ui/combobox";
export function Component() {
return (
<Combobox>
<ComboboxInput aria-label="Select a fruit" placeholder="Select a fruit..." />
<ComboboxContent>
<ComboboxListbox>
<ComboboxItem value="apple">Apple</ComboboxItem>
<ComboboxItem value="banana">Banana</ComboboxItem>
<ComboboxItem value="orange">Orange</ComboboxItem>
<ComboboxItem value="grape">Grape</ComboboxItem>
</ComboboxListbox>
</ComboboxContent>
</Combobox>
);
}Combobox
Root owner for input value, selected value, open state, and form value.
ComboboxInput
Text input with optional trigger, clear action, and start add-on slots.
ComboboxContent
Portaled popup surface that contains the listbox and option groups.
ComboboxListbox
Listbox container for grouped and ungrouped selectable items.
ComboboxItem
Selectable option with highlighted, selected, and disabled state styling.