Combobox
A searchable single-value select. The input field is the trigger — typing filters the option list in real time. Supports full keyboard navigation (Arrow keys, Enter, Escape) and submits the selected value via a hidden input when used inside a form.
Basic
Pass a string array as data for the simplest setup.
Apple
Apricot
Banana
Blueberry
Cherry
Grape
Kiwi
Mango
Orange
Peach
Pear
Pineapple
Raspberry
Strawberry
Watermelon
<Combobox
data={['Apple', 'Banana', 'Cherry', /* … */]}
label="Favourite fruit"
placeholder="Search fruits…"
/>Object data
Use { value, label } objects when the submitted value differs from the display label — e.g. country codes.
United States
United Kingdom
Germany
France
Japan
Australia
Canada
Brazil
India
China
<Combobox
data={[
{ value: 'us', label: 'United States' },
{ value: 'gb', label: 'United Kingdom' },
/* … */
]}
label="Country"
name="country"
/>Clearable
Add clearable to show an × button that resets the value.
Apple
Apricot
Banana
Blueberry
Cherry
Grape
Kiwi
Mango
Orange
Peach
Pear
Pineapple
Raspberry
Strawberry
Watermelon
<Combobox data={fruits} value="Mango" clearable />Description and error
We'll personalise your recommendations.
Apple
Apricot
Banana
Blueberry
Cherry
Grape
Kiwi
Mango
Orange
Peach
Pear
Pineapple
Raspberry
Strawberry
Watermelon
Apple
Apricot
Banana
Blueberry
Cherry
Grape
Kiwi
Mango
Orange
Peach
Pear
Pineapple
Raspberry
Strawberry
Watermelon
Please select a fruit.
<Combobox label="Fruit" description="We'll personalise your recommendations." />
<Combobox label="Fruit" error="Please select a fruit." />Disabled
Apple
Apricot
Banana
Blueberry
Cherry
Grape
Kiwi
Mango
Orange
Peach
Pear
Pineapple
Raspberry
Strawberry
Watermelon
<Combobox data={fruits} value="Kiwi" disabled />Keyboard navigation
The Combobox is fully keyboard-accessible without JS enhancements beyond the reactive island itself:
- Type — filters the option list
- ↑ / ↓ — moves keyboard focus through matching options
- Enter — selects the focused option
- Escape — closes the dropdown and restores the previous value
- Tab / click outside — closes the dropdown
Props
| Prop | Type | Default | Description |
|---|---|---|---|
data | string[] | Option[] | [] | Option list — strings or { value, label, disabled } objects |
value | string | — | Initially selected value |
placeholder | string | 'Search or select…' | Input placeholder |
label | string | — | Field label |
description | string | — | Helper text shown below the label |
error | string | boolean | — | Error message or true to highlight without text |
clearable | boolean | false | Show a clear button when a value is selected |
disabled | boolean | false | Prevents interaction |
nothingFound | string | 'Nothing found' | Message when no options match the search query |
name | string | — | Hidden input name for form submission |
size | 'xs'|'sm'|'md'|'lg'|'xl' | — | Controls height and font size |
radius | 'xs'|'sm'|'md'|'lg'|'xl' | — | Border radius |