|Kit

MultiComboboxList

A searchable, multi-value option list with checkboxes and no trigger of its own — embed it inline inside a Popover, Drawer, or panel you already control.

MultiComboboxList is MultiSelect's data contract without the trigger or the pills: a search box and a checkbox list that render permanently open, for embedding inside a container you already own the visibility of (a Popover, a Drawer, a custom panel). Picking an option toggles its checkbox without closing the list — same idea as ComboboxList, just for several values at once. It's what powers DataTable's multi-select column filter.

'use client';
import { MultiComboboxList } from '@42-central/ui-react/multi-combobox-list';

<MultiComboboxList data={['Libft', 'ft_printf', 'Get Next Line']} defaultValue={['Libft']} />

For a self-contained trigger with pills in the field, use MultiSelect instead — same data / value / onChange contract. For the single-value equivalent see ComboboxList.

The playground below renders the list bare, on the page — in real use it almost always sits inside something else that owns the open/close state (see ComboboxList's Popover example).

Playground

Component

Loading preview

Props

Code

<Component placeholder="Search…" size="md" />

Checkboxes, not pills

Every option shows a checkbox instead of a check mark; picking one adds it to the selection and keeps the list open so you can keep picking. data accepts the same shapes as MultiSelect — strings, objects, or groups.

Hide picked options

With hidePickedOptions, chosen values drop out of the list so it only ever shows what's still addable.

Max values

maxValues caps the selection — once reached, adding more is rejected (removals still work).

Clearable

clearable adds a button that clears every value at once.

Icons

icons replaces the search row's magnifier (search) and clear × (clear), and the selected option's check (check). A missing key keeps its default, and search: null drops the magnifier. A renderItem row draws its own affordance, so check doesn't reach it. Your icons are drawn as given: add className={iconStroke} (from @42/ui-react) for the kit's 1.5px line.

Code

<MultiComboboxList
  data={["Paris", "Lyon", "Nice", "Le Havre"]}
  defaultValue={["Lyon", "Nice"]}
  clearable
  icons={{ search: <Filter className={iconStroke} />, clear: <Eraser className={iconStroke} />, check: <Heart className={iconStroke} /> }}
/>

Custom rendering

renderItem owns each row's whole content — the same (item, state) => ReactNode renderer as Select's, with item being { value, label, disabled } and state { selected, highlighted }. It fully replaces the default checkbox + label row, so if you still want a selected affordance, draw your own from state.selected.

Label, description & error

Built in via Field, like the rest of the family — though most of the time you'll omit them here, since the container embedding this (a filter popover, a drawer) usually carries its own label.

Pick as many as you like

Controlled

value is a string[]; onChange hands you the full selection on every add or remove.

'use client';
import { useState } from 'react';
import { MultiComboboxList } from '@42-central/ui-react/multi-combobox-list';

export function ProjectList() {
  const [value, setValue] = useState<string[]>([]);
  return (
    <MultiComboboxList
      data={['Libft', 'ft_printf', 'Get Next Line']}
      value={value}
      onChange={setValue}
      clearable
    />
  );
}

Forms

A name renders one hidden input per selected value, so it wires into native <form> submission and FormData — the search input itself is never named (it would submit the typed query, not the selection).

<form action={save}>
  <MultiComboboxList name="projects" data={['Libft', 'ft_printf', 'Get Next Line']} />
</form>

API

Prop

Type

Accessibility

  • Full combobox keyboard model from Ark: type to filter (accent- and case-insensitive for the locale: "ele" finds "Éléphant"), ↑ / ↓ to move, Enter to toggle an option, Esc handled by the embedding container.
  • role="combobox" on the search input with aria-expanded="true" (it is permanently open), role="option" with aria-selected on each row, aria-multiselectable on the list.
  • There's no trigger and no floating panel — accessibility for the open/close affordance (focus return, Esc handling, aria-haspopup) is the embedding container's job (e.g. Popover already provides it).

Changelog

v0.30.0
  • Option lists scroll with the kit's thin scrollbars on every OS; Select's focus ring moves to the list's frame

    #494
  • Controls with no label or Field now dim in a disabled Fieldset and turn red in an invalid one

    #493
v0.20.0
  • renderItem's item.payload is typed Payload | undefined, as it always was at runtime for strings and payload-less items: guard it with item.payload?.x

    #407
  • Swap any built-in icon through an icons map — icons={{ asc, desc }} on DataTable, icons={{ show, hide }} on PasswordInput; a key you leave out keeps the kit's icon, and a part's children still win

    #361
  • Search ignores accents and case the way the locale does: "ele" finds "Éléphant", and Turkish İ/ı match

    #387
v0.19.0
  • A translations prop for the built-in trigger, clear, remove, search, increment/decrement and upload labels

    #331
  • Option checkboxes render exactly like a standalone Checkbox, including its sizes (md grows from 16px to 18px)

    #316
v0.6.0
  • Inputs drop the filled variant and the color prop

    #96
v0.3.1
  • Borders and dividers on floating panels match the panel's own surface

    #37
v0.3.0
  • nothingFound → empty across the pickers and combobox lists

    #34
v0.1.0
  • New ComboboxList and MultiComboboxList: always-open, inline single- and multi-select lists

    #11

On this page