Composants · Référence
Virtualized Combobox
A searchable, virtualized Base UI combobox with single and multiple selection, controlled search, custom triggers, and localized labels.
Dernière mise à jour le 2 octobre 2026
Overview
VirtualizedCombobox combines Base UI and TanStack Virtual into a complete searchable selector for large or remotely filtered option sets. It supports single and multiple selection, controlled open and search state, custom item rendering, and custom triggers.
Set the active locale once with KrakstackProvider; pass locale directly only when a component needs an override. Message overrides are keyed by arbitrary locale strings, so additional languages can be supplied with messages={{ es: { ... } }}. Exact locale keys such as es-MX take precedence over base keys such as es; English is the final fallback.
Install
bunx shadcn@latest add @krak-stack/virtualized-comboboxUsage
const [value, setValue] = useState(null);
<VirtualizedCombobox
ariaLabel="Select a city"
emptyLabel="No cities found."
items={cities}
onValueChange={setValue}
placeholder="Select a city"
value={value}
/>Set multiple and pass an array value for multi-selection. Use searchValue and onSearchValueChange for remote search.