Skip to main content

Typography

Mantle ships typography tokens for consistency and readability.

Scale

Mantle ships a general type scale for the headers throughout our products. Text styling is independent of the actual markup, so a Heading 1 can be styled as a Heading 2 or Heading 5 as appropriate.

Headings do not set a font family. They inherit the body font, so keep font-sans, font-family, and font-mono off them.

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5

Heading 6

LevelClassSizeWeightAdditional
Heading 1text-5xltext-5xlfont-medium-
Heading 2text-3xltext-3xlfont-medium-
Heading 3text-2xltext-2xlfont-medium-
Heading 4text-xltext-xlfont-medium-
Heading 5text-basetext-basefont-medium-
Heading 6text-xstext-xsfont-mediumuppercase tracking-widest

Colors

When possible, render text with the following tokens. They add hierarchy outside of font size, and keep type the correct color across themes.

Strong.text-strong
Body.text-body
Muted.text-muted
Placeholder.text-placeholder
TokenClassDescription
Strong.text-strongHigh emphasis text, primary content.
Body.text-bodyDefault body text.
Muted.text-mutedDe-emphasized, secondary text.
Placeholder.text-placeholderLowest emphasis, placeholder text.

Fonts

Mantle specifies Roobert as the default font for UI and headings. We also use JetBrains Mono as a monospace typeface, and Family for longform prose.

ClassFont FamilyDescription
font-sans"Roobert", ui-sans-serif, system-ui, sans-serifThe default font for rendering UI and headings. Also applied by default.
font-family"Family", "Georgia", serifBest when used in longform writing like prose documentation. Not for headings.
font-mono"JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospaceUsed to render code and tokens. Adjust the size a step down in most applications.