Skip to main content

Text

Displays text. Stock Mantine Text with one default changed: size defaults to sm here instead of Mantine's own default.

Base
Mantine + override
Mantine
Import
{ Text } from '@mantine/core'
Source
src/themes/theme.ts

Usage​

Dette er en tekst.

size
React
<Text size="sm">Dette er en tekst.</Text>

Props​

Only what this design system changes. Everything else is Mantine's — read the full props table there.

PropertyTypeAllowed valuesDefaultDescription
sizeMantineSize | (string & {})xs · sm · md · lg · xl · any CSS lengthsmSets the font size. Set via defaultProps in theme.ts, so a bare <Text> renders at 14px rather than falling back to Mantine's own default.

Accessibility​

size="sm" (14px) is content text, not body or column text, so the floor is Lc 60 rather than 75 or 90 — check a non-default c colour against the thresholds before shipping it.

truncate and lineClamp only hide overflow visually (text-overflow / -webkit-line-clamp); the full string stays in the DOM, so it is still exposed to assistive technology as-is. They are not a substitute for writing a shorter string when the truncated meaning would be lost.