• CMSnpm version

    • Overview
    • ContentBuilder
    • InviteUserForm
    • LoginForm
    • RenewPasswordForm
    • WysiwygInput
  • UInpm version

    • Overview
    • Accordion
    • AlertBubble
    • AnnouncementBar
    • Avatar
    • AvatarFileInput
    • Badge
    • Button
    • ButtonGroup
    • ButtonList
    • Calendar
    • Checkbox
    • CheckboxButton
    • CheckboxInput
    • CheckboxList
    • Chip
    • ColorRadio
    • ColorRadioGroup
    • Combobox
    • DatePicker
    • DatePickerInput
    • DateRangePicker
    • DateRangePickerInput
    • DatetimePicker
    • DatetimePickerInput
    • Dialog
    • Dropdown
    • Dropzone
    • ErrorMessage
    • FileInput
    • FlashMessages
    • FormComponent
    • Icon
    • IconButton
    • ImageGallery
    • InfoBox
    • Input
    • Label
    • Layout
    • Lightbox
    • ListItem
    • Loader
    • Lozenge
    • Menu
    • Message
    • Modal
    • ✅ ModalDialog
    • ✅ ModalHeader
    • MultiCombobox
    • MultiSelect
    • Pagination
    • Paper
    • Popover
    • Radio
    • RadioGroup
    • RasterImage
    • Select
    • Switch
    • ✅ Tabs
    • TextInput
    • TextLink
    • Textarea
    • TimePicker
    • TimePickerInput
    • Toggle
    • Tooltip
    • Typography
  • Formnpm version

    • Overview
    • AvatarFileInput
    • CheckboxButton
    • CheckboxInput
    • CheckboxList
    • ColorRadioGroup
    • Combobox
    • DatePickerInput
    • DateRangePickerInput
    • DatetimePickerInput
    • Dropzone
    • FileInput
    • Form
    • FormRenderer
    • GpsInput
    • MoneyInput
    • MultiCombobox
    • MultiSelect
    • NumberInput
    • PasswordInput
    • RadioGroup
    • Select
    • TextInput
    • Textarea
    • TimePickerInput
    • Toggle
  • DataGridnpm version

    • Overview
    • DataGrid
    • DataGridCustomExample
    • ExportButton
    • FilterList
    • Filters
    • FiltersButton
    • FulltextInput
    • HiddenColumns
    • HiddenColumnsButton
    • Pagination
    • RowCounts
    • RowsPerPageSelect
    • SelectedRowsToolbar
    • TableV2
    • ToolbarControl
    • ToolbarCustoms
    • ToolbarTabs
  • Wysiwygnpm version

    • Overview
  • Resizernpm version

    • Overview
  • Routernpm version

    • Overview
  • Corenpm version

    • Overview
  • Core-Reactnpm version

    • Overview
  • DnDnpm version

    • Overview
  • Page-Buildernpm version

    • Overview
  • Page-Builder-CMSnpm version

    • Overview
  • Page-Builder-Webnpm version

    • Overview
  • Sentrynpm version

    • Overview
  • Stylesnpm version

    • Overview
  • Localizenpm version

    • Overview
  • Analyticsnpm version

    • Overview
  • Datepickernpm version

    • Overview
  • Icons-generatornpm version

    • Overview
  • Smart-addressnpm version

    • Overview
  • E2Enpm version

    • Overview
  • E2E-Playwrightnpm version

    • Overview
View source on GitLab

MultiCombobox

Multi-value picker with a searchable text input, built on Base UI Combobox in multiple mode. Selected values render as removable chips; options are filtered as the user types and can be loaded asynchronously.

When to use

Reach for MultiCombobox when the user picks several values from a list and should be able to filter by typing (or the options come from a server).

  • Only one value? Use Combobox.
  • Don't need search? Use MultiSelect.

Use @uxf/ui/multi-combobox for a controlled component outside a form. Inside a @uxf/form form, use @uxf/form/multi-combobox instead — it registers the field with react-hook-form and derives isInvalid / helperText from validation. This @uxf/ui component is the controlled primitive the form twin wraps.

Usage

import { MultiCombobox, MultiComboboxOption, MultiComboboxValue } from "@uxf/ui/multi-combobox";
import { useState } from "react";

const options: MultiComboboxOption<string>[] = [
    { color: "red", id: "one", label: "Option red" },
    { color: "blue", id: "two", label: "Option blue" },
    { id: "three", label: "Option three" },
];

function Example() {
    const [value, setValue] = useState<MultiComboboxValue<string>[] | null>(null);

    return (
        <MultiCombobox
            label="Choose options"
            name="example"
            onChange={setValue}
            options={options}
            placeholder="Search..."
            value={value}
        />
    );
}

value is an array of option objects (MultiComboboxValue[], i.e. { id, label }[]) or null, and onChange receives the new array. Selected chips can be removed with their close button or by pressing Backspace while the query is empty.

Exports: MultiCombobox and the types MultiComboboxProps, MultiComboboxOption, MultiComboboxValue, MultiComboboxValueId, MultiComboboxRef.

Props

MultiComboboxProps<ValueId = MultiComboboxValueId, Option = MultiComboboxOption<ValueId>> extends FormControlProps<Option[] | null>. MultiComboboxValueId is number | string; MultiComboboxValue is { id: ValueId; label: string }; MultiComboboxOption adds color?: ChipColor and disabled?: boolean. It is not Clearable — there is no isClearable prop.

PropTypeDefaultDescription
labelReactNode—Required. Field label.
namestring—Required. Field name (also set as data-name).
valueOption[] | null—Required. Selected option objects, or null.
onChange(value: Option[]) => void—Required. Called with the new array of selected options.
optionsOption[]—Static option list. Optional; omit when using loadOptions.
loadOptions(query: string, { signal }) => Promise<Option[]>—Async option loader. When set, the component is async and skips local filtering. signal aborts when the result is no longer wanted (new query, unmount, the field paused, a new loadOptions); pass it to fetch.
withCheckboxesbooleanfalseRender options as a checkbox list (keeps selected options visible in the list).
placeholderstring—Placeholder for the text input.
helperTextReactNode—Text under the control; styled as an error when isInvalid.
isDisabledbooleanfalseDisable the control.
isReadOnlybooleanfalsePrevent changes while staying focusable.
isInvalidbooleanfalseInvalid styling; sets aria-invalid and styles helperText as an error.
isRequiredbooleanfalseMark the field required (adds the label indicator).
hiddenLabelbooleanfalseVisually hide the label (kept for assistive tech).
renderOption(option: Option) => ReactNodeoption.labelCustom renderer for each dropdown option (ignored when withCheckboxes).
keyExtractor(option: Option) => string | numberoption.idCustom React key for options.
noQueryMessagestringlocalized "Start typing to see options"Shown when the query is empty.
noOptionsMessagestringlocalized "No items found"Shown when there are no options.
notFoundMessagestringlocalized "Nothing found"Shown when a non-empty query matches nothing.
allOptionsSelectedMessagestringlocalized "All options are already selected"Shown when every option is selected.
iconNameIconName"caretDown"Icon for the dropdown arrow.
sizeInputGroupSize"default""small", "default", or "large".
variantInputGroupVariant"default"Input group variant.
idstringauto (useId)Root id; the error-message id derives from it.
onBlur / onFocusFocusEventHandler<HTMLInputElement>—Focus handlers.

Its ref points at the text <input> (MultiComboboxRef = HTMLInputElement). Layout/dropdown props: className, style, form, leftAddon, rightAddon, leftElement, rightElement, inputArrow, dropdownClassName, dropdownEndContent, dropdownMatchesInputWidth, dropdownMaxHeight (default 240), dropdownPlacement (default "bottom"), dropdownStrategy.

Variants & states

  • Search: typing filters options locally by label (accent-insensitive via slugify) and hides already-selected options; with loadOptions, filtering is delegated to the loader (debounced ~200 ms).
  • Checkbox mode: withCheckboxes renders each option as a checkbox and keeps selected options in the list rather than hiding them.
  • Chips: each selected value is a Chip; its color comes from the option's color. Chips are removable unless the control or the option is disabled.
  • Sizes: small, default, large (via size).
  • Invalid / disabled / read-only: as with the other form controls (isInvalid, isDisabled, isReadOnly).
  • Content below the options: dropdownEndContent pins content (typically an "add a new item" button) below the options. It stays visible while the list scrolls and when nothing matches, fits inside dropdownMaxHeight together with the list, and is not part of the arrow-key navigation. Static content (ReactNode) leaves the dropdown open; the function form (args) => ReactNode gets args.close(), which closes the dropdown without changing the value.

Requirements

The component composes the input, label, dropdown, form-component, icon, and chip primitives, so import their stylesheets once in your global CSS:

@import url("@uxf/ui/css/icon.css");
@import url("@uxf/ui/css/dropdown.css");
@import url("@uxf/ui/css/label.css");
@import url("@uxf/ui/css/form-component.css");
@import url("@uxf/ui/css/input-basic.css");
@import url("@uxf/ui/css/input.css");
@import url("@uxf/ui/css/chip.css");
@import url("@uxf/ui/css/multi-combobox.css");

When using withCheckboxes, also import the checkbox stylesheets:

@import url("@uxf/ui/css/checkbox.css");
@import url("@uxf/ui/css/checkbox-input.css");

Also requires the global @uxf/ui token layer, set up once per app — see @uxf/ui setup.

Async
Open in new tab
Default
Open in new tab
DropdownEndContent
Open in new tab
Sizes
Open in new tab
States
Open in new tab