Forms
Combobox
A value picked from a long list you can search: a time zone, a category, a set of tags. Options come as data, in groups, with keywords that find them. It takes one value or several, can create what was typed, and marks an option picked for the person, such as by a model, so they confirm or change it. On the overlay surface, with the command palette's rows.
Preview
418 zones. Try "tok" or "sao"
one suggested, to confirm
Installation
// Resolves dependencies, copies the source, and installs npm packages automatically.
Usage
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| options | { value; label; group?; hint?; keywords?; suggested?; disabled? }[] | - | The list. group is the heading an option sits under |
| value / onValueChange | string | null, or string[] with multiple | - | Controlled. With multiple, each pick toggles and the list stays open |
| multiple | boolean | false | Several values, shown as two chips and a count |
| creatable / onCreate | boolean / (label: string) => string | - | Offer to create what was typed when nothing matches it; the returned value is selected |
| renderOption | (option) => ReactNode | - | The row's content, such as an IconTile and a name |
| emptyText, searchPlaceholder, createLabel, suggestedLabel | ReactNode, string, (query) => ReactNode, string | - | The words, for another language or a more precise message |