Design Tokens
Design tokens are a tech-agnostic way to store variables. We use tokens instead of hard coded values to ensure a better UI consistency across different platforms.
Mantine's rem() helper emits calc(Nrem * var(--mantine-scale)) rather than a
plain length, which is why each row shows the pixel value it resolves to at the
default scale with the literal value underneath.
Spacing
An eight-step scale on a 4/8 grid. Used for p, m, gap and by every
component override.
| Key | CSS variable | Value | Preview |
|---|---|---|---|
| xxs | --mantine-spacing-xxs | 2px calc(0.125rem * var(--mantine-scale)) | |
| xs | --mantine-spacing-xs | 4px calc(0.25rem * var(--mantine-scale)) | |
| sm | --mantine-spacing-sm | 8px calc(0.5rem * var(--mantine-scale)) | |
| smd | --mantine-spacing-smd | 12px calc(0.75rem * var(--mantine-scale)) | |
| md | --mantine-spacing-md | 16px calc(1rem * var(--mantine-scale)) | |
| lg | --mantine-spacing-lg | 24px calc(1.5rem * var(--mantine-scale)) | |
| xl | --mantine-spacing-xl | 32px calc(2rem * var(--mantine-scale)) | |
| xxl | --mantine-spacing-xxl | 48px calc(3rem * var(--mantine-scale)) |
Radius
theme.defaultRadius is sm, so a component that says nothing about radius is
5px. round is the pill shape — a large fixed length rather than a percentage,
so it stays a capsule at any height.
| Key | CSS variable | Value | Preview |
|---|---|---|---|
| xs | --mantine-radius-xs | 3px calc(0.1875rem * var(--mantine-scale)) | |
| sm | --mantine-radius-sm | 5px calc(0.3125rem * var(--mantine-scale)) | |
| md | --mantine-radius-md | 8px calc(0.5rem * var(--mantine-scale)) | |
| lg | --mantine-radius-lg | 16px calc(1rem * var(--mantine-scale)) | |
| xl | --mantine-radius-xl | 32px calc(2rem * var(--mantine-scale)) | |
| round | --mantine-radius-round | 9999px calc(624.9375rem * var(--mantine-scale)) |
Type
Font sizes, line heights, weights and letter spacing live on the Typography page, together with the heading sizes and the guidance on what each step is for.
Icon sizes
Numeric, not a Mantine theme property — Tabler icons take size as a number for
the SVG's width and height.
| Key | Value | Preview |
|---|---|---|
| xs | 8px | |
| sm | 16px | |
| smd | 20px | |
| md | 24px | |
| lg | 32px | |
| xl | 48px |
Buttons size their leftSection and rightSection icons independently of this
scale — 16 / 18 / 20px at sm / md / lg — set in button.module.css.
Motion
Three durations, in milliseconds. Exported as a JS constant because Mantine
takes durations as numbers, and mirrored as --mantine-duration-* by the CSS
variable resolver so a transition written in CSS and one handed to a component
prop cannot drift apart.
| Key | Value | CSS variable | For |
|---|---|---|---|
fast | 150ms | --mantine-duration-fast | Control states and dropdown transitions |
base | 200ms | --mantine-duration-base | Short travel — an indicator or thumb moving a small distance |
slow | 300ms | --mantine-duration-slow | Modal and Spotlight transitions |
Shadows
Five steps on Mantine's scale, plus one the design system adds. Shadows are scheme-neutral: the same values apply in dark mode.
xs
sm
md
lg
xl
modal
--mantine-shadow-modal is the lifted-surface shadow and is deliberately not
part of the xs–xl scale: none of the five matched it, and overwriting one would
have moved every other component that uses it.
Breakpoints
In em, not rem or px — a media query in em responds to the user's
browser font size, which px does not.
| Key | CSS variable | Value |
|---|---|---|
| xs | --mantine-breakpoint-xs | 36em |
| sm | --mantine-breakpoint-sm | 48em |
| md | --mantine-breakpoint-md | 62em |
| lg | --mantine-breakpoint-lg | 75em |
| xl | --mantine-breakpoint-xl | 88em |