Combobox
Searchable single-select with autocomplete.
Import
tsx
import { Combobox } from "@cooud-ui/ui";
bash
npx cooud-ui add combobox
Examples
API Reference
Generated from the component's exported types.
ComboboxProps
| Prop | Type | Default | Description |
|---|---|---|---|
options* | ComboboxOption[] | — | The list of selectable options. |
value | string | — | Controlled selected value. Pair with `onValueChange`. |
defaultValue | string | — | Initial value for uncontrolled usage. |
onValueChange | (value: string) => void | — | Called with the new value when the selection changes. |
placeholder | string | "Select an option…" | Text shown on the trigger when nothing is selected. |
searchPlaceholder | string | "Search…" | Placeholder for the search input inside the popover. |
emptyText | string | "No results found." | Message rendered when no option matches the search. |
disabled | boolean | false | Disables the trigger entirely. |
className | string | — | Extra classes for the trigger button. |
contentClassName | string | — | Extra classes for the popover content. |
aria-label | string | — | Accessible name for the trigger when there is no visible label. |
aria-labelledby | string | — | ID of an element labelling the trigger. |