Combobox
An input that filters a list as you type, for one value, many as chips, or a button whose list has its own search.
Examples
Default
Type to filter, and Enter picks the first match. As you type, the list moves to the height of what still matches.
Multiple
With multiple, each value is a chip. Backspace in the empty input removes the last one.
Groups
Pass groups as items, each with its own items; a long list scrolls.
Search in the list
Give ComboboxTrigger children for a button that shows the value, and put the input in ComboboxContent.
From a server
Set filter to null and pass the results as items. Once a search lasts, a spinner shows: in the list while it is empty, in the field while older results still show. ComboboxStatus tells a screen reader how many it found.
In a form
In a Field, its label names the input and an invalid field marks it, with the error under it.
Installation
npx shadcn@latest add https://kinoui.com/r/combobox.json- Files
lib/reduce-motion.tslib/scroll.tslib/refs.tslib/resize.tslib/swap.tsxlib/popup.tslib/glide.tsxcomponents/kino/tooltip.tsxlib/cut.tsxcomponents/kino/input.tsxcomponents/kino/label.tsxcomponents/kino/spinner.tsxcomponents/kino/button.tsxcomponents/kino/separator.tsxlib/run-progress.tslib/highlight.tslib/menu.tsxcomponents/kino/select.tsxlib/filter-list.tsxlib/chip.tsxlib/flow.tscomponents/kino/combobox.tsx- Packages
@base-ui/reactclass-variance-authority- Global CSS
- the feels, the density tokens, the shape tokens and the success and warning colours
New to Kino? Installation covers what your project needs first and the @kino namespace.
API reference
Combobox
ComboboxChipRemove
ComboboxContent
ComboboxItem
Accessibility
- The input is a combobox and the list a listbox: arrow keys move the highlight, Enter picks, and Escape closes the list.
- Escape on a closed combobox clears its value, as the WAI-ARIA pattern allows.
- Name it with a
Fieldand its label,ComboboxLabel, oraria-label. With the input in the list, giveComboboxContentanaria-labeltoo. - Each chip’s remove button is named after its chip, and a chip says it can be removed with Backspace or Delete.
- The picked option has a tick as well as a highlight, so its state never relies on colour.
- When the system asks for less motion, the list changes height at once and only fades.