Skip to main content

TextInput

A single-line text field with a right-aligned notation for a unit or symbol such as kr, % or kg. Everything else works as in Mantine.

Base
Wrapper over Mantine
Import
{ TextInput } from '@multiconsult-group-products/design-system'
@mantine/core exports this name too — that one is a different component.
Source
src/components/TextInput/TextInput.tsx
src/components/TextInput/TextInput.module.css

Usage​

label
left icon
right section
error
disabled
size
sm
md
lg
React
<TextInput placeholder="0" size="md" label="Beløp" notation={<IconSearch />} />

Props​

Only what this component adds or removes versus Mantine's TextInput — read the full props table there.

PropertyTypeAllowed valuesDefaultDescription
notationReactNode——A unit or short mark in the right section, text or icon. It takes the place of rightSection, which is not exposed. A notation wider than the default section needs rightSectionWidth.

Accessibility​

Give the field a label. A notation does not name the field. See Accessibility for what applies to every component.