Typography
Text is the primary way that users digest content and accomplish work, so it’s important to use good typographic principles to establish a clear visual hierarchy and to maximize legibility.
Typeface
Inter, self-hosted through @fontsource — no runtime request to Google
Fonts. It is set once on theme.fontFamily and again on
theme.headings.fontFamily, so headings and body share one typeface.
Mantine itself loads nothing. theme.fontFamily only names a face, and if
nothing on the page has loaded it the browser falls straight through to the next
entry in the stack. Loading is this package's job, in three hops: inter.css
declares the @font-face rules against the woff2 files inside
@fontsource/inter, fonts.ts imports that stylesheet for its side effect, and
theme.ts imports fonts.ts — so the font travels with the theme rather than
having to be wired up next to it. The sideEffects field in package.json
keeps a bundler from tree-shaking that import away.
A consuming application therefore installs nothing extra and adds no <link>
tag: the build inlines each woff2 as base64 inside the @font-face rules, so
importing the design system's styles.css brings the font files themselves with
it — there is no separate asset to copy or resolve.
Only the weights listed below are loaded. Asking for any other weight makes the
browser synthesize a fake one, which is why the scale is closed: adding a weight
means adding its @font-face rule in inter.css.
Weights
| Weight | Name | Used for |
|---|---|---|
| 400 | Regular | Body text, labels, and — deliberately — button text |
| 600 | SemiBold | Every heading. theme.headings.fontWeight is '600' |
| 700 | Bold | Emphasis inside running text; never a whole block |
Weight 500 (Medium) is loaded by inter.css but nothing in the design system
uses it. Reach for 600 rather than 500 when text needs to step forward.
Italic exists at 400 only. There is no bold italic — asking for one gives a synthesized face.
Font scale
Every size in the system, smallest first. A step with no CSS variable has no token behind it: that size has to be set explicitly, and doing so should be rare enough to argue for each time.
| Example | Size | CSS variable | Token | Description |
|---|---|---|---|---|
| Aa | 10px | Mainly only used with graphs | ||
| Aa | 12px | --mantine-font-size-xs | xs | Labels, captions and metadata. |
| Aa | 14px | --mantine-font-size-sm | sm | The default content size. |
| Aa | 16px | --mantine-font-size-md | md | This size might be used in mobile apps(?) |
| Aa | 18px | --mantine-font-size-lg | lg | Lead paragraph, body text for public pages or long articles. |
| Aa | 20px | --mantine-font-size-xl | xl | Largest body size. |
| Aa | 24px | --mantine-h3-font-size | h3 | Subsection heading. |
| Aa | 32px | --mantine-h2-font-size | h2 | Section heading. |
| Aa | 40px | No token. Set the size explicitly. | ||
| Aa | 48px | --mantine-h1-font-size | h1 | Page title. |
| Aa | 64px | Hero title |
12px is the floor. Nothing in the package renders text below it. Smaller values are allowed only where they are hardcoded in a special component — a chart axis is the intended case — and no such component exists yet.
14px is the default, not 16px. Text defaults to size="sm", --input-fz
is pinned to sm, and body is pinned to font-size-sm. 16px is tolerated
where a stock Mantine fallback lands on it, but it is never chosen for body
text: a missed pin that renders 16px is cosmetic, one that renders 10px is
unreadable, so the scale fails upward.
Sizes are declared in rem, so the scale follows the user's browser font size.
There is no 62.5% root reset in this system: 1rem is 16px.
Why only five sizes have a size token
Mantine's fontSizes is a fixed five-key t-shirt scale — xs, sm, md,
lg, xl — and that is the whole vocabulary the size prop accepts on Text,
inputs and buttons. It cannot hold the heading sizes as well, so the ramp is
split across two theme properties. The split is Mantine's, not a design
decision:
fontSizes(12–20px) — body and UI text, reached by name throughsize.headings.sizes(20–48px) — h1–h4, reached through<Title order>.
Everything above 48px falls outside both.
Line height
Line height is handled for you. The design system does not override
theme.lineHeights, so Mantine's own scale applies and a component takes the
leading that belongs to the size it is already rendering at. Nothing needs to
be passed.
They are unitless ratios, which means the leading scales with the font size rather than being pinned to a pixel value:
| Token | Ratio |
|---|---|
xs | 1.4 |
sm | 1.45 |
md | 1.55 |
lg | 1.6 |
xl | 1.65 |
Headings are the exception: they carry their own ratios on
theme.headings.sizes — h1 1.2, h2 1.3, h3 1.4, h4 1.5. A heading is short and
rarely wraps, so it is set tighter on purpose.
Spacious line spacing
For a block of running text, open the leading with the lh prop rather than
with a hardcoded value:
<Text lh="xl">{/* 1.65 — the loosest step on the scale */}</Text>
lh takes any key from the scale above, and a raw value for anything the scale
does not cover (lh={1.5}). There is no separate "spacious" token: lg and
xl already sit above the 1.5× line height WCAG 1.4.12 names, so adding one
would be a second name for a step that exists.
The default, sm at 1.45, is deliberately just under that. It is the density a
data-heavy application wants; a page that is mostly prose should ask for lg
or xl.
Web vs app
Text on public web pages has to be easy to read, navigate and interact with, so those pages use the larger end of the scale. B2B applications are functional and usually dense with data; reading a value in context with the values around it matters more than reading any one of them comfortably, so they sit lower on the scale. This is why the default is 14px rather than 16px — the design system is built for the second case first.
Accessibility
Text must survive 200% zoom (WCAG 1.4.4). This is a requirement for public
sector web pages and the system applies it everywhere, professional
applications included. Declaring sizes in rem is what makes that work.
Text spacing must be overridable (WCAG 1.4.12). A user stylesheet that sets any of the following must not clip or overlap content:
- line height at least 1.5× the font size, for multi-line text
- spacing after a paragraph at least 2× the font size
- letter spacing at least 0.12× the font size
- word spacing at least 0.16× the font size
The criterion is about what happens when a user overrides these values, not about the values the system ships — a layout that assumes its own leading is what breaks.
Languages and scripts that do not use one or more of these properties conform using only the properties that exist for that combination.
Everything else — contrast, focus, labelling — lives on the Accessibility page. Contrast in this system is measured with APCA, not the WCAG ratio.