Combobox
Searchable dropdown with inline option creation, grouped items, keyboard navigation, and optional multi-select tag pills.
Searchable & Creatable Combobox
Filter grouped options or type any unlisted venue to create it inline.
combobox-example.tsx
Selected value: shelter
Size
Multi-Select & Tag Creation
Select multiple options as removable pills, press Backspace to remove the last tag, or type a brand-new genre.
combobox-multiple.tsx
Quick Import
Example.tsxtsx
1import { Combobox } from "@rekodo/react";2
3export function Example() {4 return (5 <Combobox6 creatable7 clearable8 defaultValue="shelter"9 options={[10 { value: "shelter", label: "Shimokitazawa SHELTER", group: "Shimokitazawa" },11 { value: "www", label: "Shibuya WWW", group: "Shibuya" },12 ]}13 placeholder="Select or add a venue..."14 />15 );16}API Reference
Props accepted by this component.
| Prop | Type | Default | Description |
|---|---|---|---|
| options | ComboboxOption[] | required | Array of { value, label, description?, disabled?, group? } items. |
| value / defaultValue | string | "" | Controlled or uncontrolled selected value (single-select mode). |
| onValueChange | (value: string) => void | undefined | Fires when the selected value changes in single-select mode. |
| multiple | boolean | false | Enables multi-select mode with removable tag pills. |
| values / defaultValues | string[] | [] | Controlled or uncontrolled selected values (multi-select mode). |
| onValuesChange | (values: string[]) => void | undefined | Fires when selected values change in multi-select mode. |
| creatable | boolean | false | Shows an inline create row when no exact match exists for the search query. |
| onCreateOption | (inputValue: string) => ComboboxOption | string | void | undefined | Optional callback when creating a new option. May return a custom option or value. |
| createLabel | (inputValue: string) => ReactNode | `Create "${q}"` | Custom label renderer for the create row. |
| clearable | boolean | false | Displays a clear button on the trigger when a selection is active. |
| placement | "bottom" | "top" | "auto" | "bottom" | Popover placement relative to the trigger. |
| size | "sm" | "default" | "lg" | "default" | Trigger height and typography scale. |
| accent | "violet" | "rose" | "violet" | Focus ring and active item highlight accent. |
| invalid / disabled | boolean | false | Validation or disabled state. |