Combobox

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.

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.

Quick Import

Example.tsxtsx
1import { Combobox } from "@rekodo/react";
2
3export function Example() {
4 return (
5 <Combobox
6 creatable
7 clearable
8 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.

PropTypeDefaultDescription
optionsComboboxOption[]requiredArray of { value, label, description?, disabled?, group? } items.
value / defaultValuestring""Controlled or uncontrolled selected value (single-select mode).
onValueChange(value: string) => voidundefinedFires when the selected value changes in single-select mode.
multiplebooleanfalseEnables multi-select mode with removable tag pills.
values / defaultValuesstring[][]Controlled or uncontrolled selected values (multi-select mode).
onValuesChange(values: string[]) => voidundefinedFires when selected values change in multi-select mode.
creatablebooleanfalseShows an inline create row when no exact match exists for the search query.
onCreateOption(inputValue: string) => ComboboxOption | string | voidundefinedOptional 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.
clearablebooleanfalseDisplays 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 / disabledbooleanfalseValidation or disabled state.