TagsInput
A text field where the user types free-form values and each one becomes a tag. Use it for keywords and other lists the user builds from scratch. When the values come from a fixed list, use MultiSelect.
Base
Mantine + override
Mantine
Import
{ TagsInput } from '@mantine/core'
Source
src/themes/theme.ts
src/themes/style-overrides/tagsinput.module.css
src/themes/style-overrides/combobox.module.css
Usage
BetongStål
clearable
disabled
size
sm
md
lg
React
<TagsInput label="Nøkkelord" placeholder="Legg til nøkkelord" size="md" defaultValue={['Betong', 'Stål']} />
Props
Only what this design system changes. Everything else is Mantine's — read the full props table there.
| Property | Type | Allowed values | Default | Description |
|---|---|---|---|---|
size | MantineSize | sm · md · lg | md | Sets the field height. |
comboboxProps | ComboboxProps | — | { transitionProps: { transition: 'fade-down', duration: 150 } } | Configures the dropdown. The default sets the motion. Shared with the other comboboxes. |
Accessibility
Give the field a label. The tags show what has been entered, not what the field is for. See
Accessibility for what applies to every component.