

Every state


default


empty


focus


open


search


no-match


filled


error


disabled
Props
| Prop | Type | Default | What it does |
|---|---|---|---|
| id | string | "reviewers" | Input id; the listbox, option, description and error ids hang off it. |
| name | string | "reviewers" | Form name; one hidden input per chosen person id. |
| label | string | "Reviewers" | Field label, also the listbox name. |
| description | string | "They get an email when the draft is ready." | Line under the field. |
| placeholder | string | "Search by name or role" | Placeholder while nobody is chosen. |
| people | { id: string; name: string; detail: string }[] | eight made-up people | The people; detail is the second line (a role or an email). |
| defaultValue | string[] | ["p1", "p3"] | Ids chosen at the start. |
| defaultOpen | boolean | – | Open the list at the start (for previews). |
| max | number | – | Most people that can be chosen; no limit when left out. |
| onChange | (ids: string[]) => void | – | Called with the chosen ids after every change. |
| emptyLabel | (query: string) => string | "Nobody matches “…”." | What the list says when nobody matches. |
| error | string | – | Error under the field; marks the input invalid. |
| disabled | boolean | – | Disables the field, the chips and the list. |
| className | string | – | Extra classes on the field. |
More multi-selects
All 6multi-select-04 is in UI ProGet UI Pro, €199


