MultiSelect
A dropdown for choosing several values from a fixed list. The selection stays on one row, so the field keeps its height however many values are chosen.
@mantine/core exports this name too — that one is a different component.Mantine's own MultiSelect has the same field and dropdown styling, but its pills wrap onto new lines and grow the field. Import this one from the design system to get the single row and the count.
Usage
<MultiSelect label="Fagområder" placeholder="Velg fagområder" size="md" data={['Bygg', 'Elektro', 'VVS', 'Grunnarbeid']} defaultValue={['Bygg', 'Elektro']} />
Pills that do not fit whole are hidden. A badge to the left of the chevron shows the number of selected values.
Props
Only what this component adds or removes versus Mantine's MultiSelect —
read the full props table there.
| Property | Type | Allowed values | Default | Description |
|---|---|---|---|---|
withClearButton | boolean | — | false | Adds a clear-all button inside the count badge. Hidden when nothing is selected, read-only or disabled. |
removeLabel | (label: string) => string | — | label => `Fjern ${label}` | Accessible name of a pill's remove button. |
clearLabel | string | — | 'Tøm valg' | Accessible name of the clear-all button. |
selectedLabel | (count: number) => string | — | count => `${count} valgt` | Text read by assistive technology in place of the visible count. |
renderPill | — | — | — | Not exposed. |
classNames | — | — | — | Not exposed. |
styles | — | — | — | Not exposed. |
placeholder | string | — | — | Hidden once a value is selected. |
Accessibility
Give the field a label. Without one it loses its accessible name once a value is selected. Hidden
pills leave the tab order, and the count badge reports the total to assistive technology. See
Accessibility for what applies to every component.