Skip to main content
Skip to design system navigation

TYPOGRAPHY

Type tokens live in app/css/theme.css. Sizes use rem units, so they follow the reader's default font size.

Families

TokenFamilyUse
Token--font-monoFamilyJetBrains Mono 400 and 700, self-hostedUseEverything except a visible h1
Token--font-displayFamilyInter, weight 900UseA visible h1; an sr-only h1 uses the mono family so its page does not download Inter

Scale

TokenUtilitySize
Token--text-xsUtilitytext-xsSize12px below 768px; at least 13px from 768px
Token--text-smUtilitytext-smSize14px
Token--text-baseUtilitytext-baseSize16px
Token--text-lgUtilitytext-lgSize18px
Token--text-xlUtilitytext-xlSize20px
Token--text-2xlUtilitytext-2xlSize24px
Token--text-3xlUtilitytext-3xlSize32px
Token--text-5xlUtilitytext-5xlSize48px
Token--text-7xlUtilitytext-7xlSize64px

--text-min rises from 12px to 13px at 768px, and --text-xs uses it as a floor. Fixed pixel utilities do not inherit the floor, so use these tokens for small text.

Specimens

text-xs: the quick brown fox

text-sm: the quick brown fox

text-base: the quick brown fox

text-xl: the quick brown fox

text-3xl: the quick brown fox

SOURCE

<p className="ds-specimen text-xs">text-xs: the quick brown fox</p>
  <p className="ds-specimen text-sm">text-sm: the quick brown fox</p>
  <p className="ds-specimen text-base">text-base: the quick brown fox</p>
  <p className="ds-specimen text-xl">text-xl: the quick brown fox</p>
  <p className="ds-specimen text-3xl">text-3xl: the quick brown fox</p>

Headings

The base h1 is 32px, rising to 48px at 1280px. h2 is 20px, rising to 24px at 768px. h3 is 16px. Larger steps are for display text and chosen by the consumer.