Design System

Type reference ​

Every role, weight and family, with the values behind them. For what these names mean, see Overview. For how to choose between them, see Usage.

Sizes and line heights are given at the default interface size of 14. They move together when a user changes it.

The six roles ​

RoleSizeLine heightWeightMeasureFor
text-caption1216400noneNames or annotates something else. Form labels, table metadata, timestamps, counters
text-body142040066chA sentence a reader reads. The default, and what an element inherits when it says nothing
text-body-strong142060066chBody text carrying emphasis
text-heading1620600noneA heading inside a panel or a settings section
text-title1824600noneA dialog title, a page header, an empty state heading
text-hero2432600noneOnboarding and celebration screens. Never on a screen carrying data

Every size is a whole number of pixels and every line height is a multiple of four at the default.

Each role has a token at text.<role> and a custom property at --text-<role>, with the line height and the weight on --text-<role>--line-height and --text-<role>--font-weight.

  • text-captioncalc(12 / 14 * 1rem) · line-height calc(16 / 12) · weight 400

    The quick brown fox jumps over the lazy dog

  • text-bodycalc(14 / 14 * 1rem) · line-height calc(20 / 14) · weight 400

    The quick brown fox jumps over the lazy dog

  • text-body-strongcalc(14 / 14 * 1rem) · line-height calc(20 / 14) · weight 600

    The quick brown fox jumps over the lazy dog

  • text-headingcalc(16 / 14 * 1rem) · line-height calc(20 / 16) · weight 600

    The quick brown fox jumps over the lazy dog

  • text-titlecalc(18 / 14 * 1rem) · line-height calc(24 / 18) · weight 600

    The quick brown fox jumps over the lazy dog

  • text-herocalc(24 / 14 * 1rem) · line-height calc(32 / 24) · weight 600

    The quick brown fox jumps over the lazy dog

Weights ​

ClassWeight
font-regular400
font-medium500
font-bold600

The shipped face is declared across 400 to 600. A request above 600 renders at 600 and a request below 400 renders at 400, with nothing reported. b and strong resolve to font-bold rather than to the browser's default.

Families ​

ClassStack
font-sansInter, "Inter Fallback", ui-sans-serif, system-ui, sans-serif
font-monoui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace

The system ships the interface face and no monospace face, so mono resolves to what the platform already provides.

A user can replace the interface face from settings with one of seven system faces. Those carry a regular and a bold and nothing between, which is why medium never separates two roles.

Measure ​

TokenValueUtility
container.measure66chmax-w-measure

Write max-w-measure on body and body-strong running as prose. Not on captions, headings, or anything bounded by a column.

The text size setting ​

Value
Minimum12
Default14
Maximum24

Every role is written relative to this, so all six move together. Spacing does not move with it, because the grid is written in pixels.

What the roles replace ​

These stock namespaces are emptied before the roles are declared. font-serif, the four leading-* names in the table and the six tracking-* names generate no CSS and produce no warning. text-xs to text-2xl, font-normal, font-semibold and leading-normal are aliased back onto role values so the component library preset keeps rendering, with font-semibold at 600. text-6xl and text-7xl are re-declared for the glyphs in the keyboard shortcut dialog and resolve to 52 and 64 at the default.

NamespaceStock classesWrite instead
--text-*text-xs, text-sm, text-base, text-lg, text-xl, text-2xlone of the six roles
--font-weight-*font-normal, font-semiboldfont-regular, font-medium, font-bold
--font-*font-seriffont-sans, font-mono
--leading-*leading-tight, leading-snug, leading-relaxed, leading-loosethe line height on the role, or leading-none
--tracking-*tracking-tighter, tracking-tight, tracking-normal, tracking-wide, tracking-wider, tracking-widestnothing. The system sets no letter spacing

Tokens covers why the namespaces are cleared rather than the classes merely discouraged.