Foundations

Typography

40 typography tokens. A brand swaps the families and some sizes; the scale’s steps stay the same. The base theme sets text in the system UI font, so a new project starts with nothing to download. The fluid sizes below change with your window.

Type scale

  1. Display--font-size-displayclamp(2rem, 0.75rem + 5vw, 5rem) / 1.125clamp(2rem, 0.75rem + 5vw, 5rem) / 1.125clamp(2rem, 0.75rem + 5vw, 5rem) / 1.125

    Tokens first, then components

  2. H1 fluid--font-size-h1-fluidclamp(1.75rem, 0.75rem + 4vw, 4rem) / 1.125clamp(1.75rem, 0.75rem + 4vw, 4rem) / 1.125clamp(1.75rem, 0.75rem + 4vw, 4rem) / 1.125

    Getting started

  3. H2 fluid--font-size-h2-fluidclamp(1.625rem, 1rem + 2.5vw, 3rem) / 1.25clamp(1.625rem, 1rem + 2.5vw, 3rem) / 1.25clamp(1.625rem, 1rem + 2.5vw, 3rem) / 1.25

    Component library

  4. H3 fluid--font-size-h3-fluidclamp(1.5rem, 1rem + 2vw, 2.5rem) / 1.25clamp(1.5rem, 1rem + 2vw, 2.5rem) / 1.25clamp(1.5rem, 1rem + 2vw, 2.5rem) / 1.25

    Foundations

  5. H4--font-size-h424px / 32px28px / 32px24px / 32px

    Install the package

  6. H5--font-size-h520px / 24px20px / 24px20px / 24px

    Props

  7. Body--font-size-body18px / 28px18px / 28px18px / 28px

    Body text is sized for reading, so long passages stay comfortable without zooming in.

  8. Control--font-size-control16px / 24px16px / 24px16px / 24px

    Save changes

  9. Small--font-size-small14px / 20px14px / 20px14px / 20px

    Supporting text and table cells

  10. Label--font-size-small14px / 16px14px / 16px14px / 16px

    Email address

  11. Caption--font-size-caption12px / 16px12px / 16px12px / 16px

    Updated 30 September 2026

Tokens

Families

Each brand names its own families; the base theme uses the system UI font for text, so a new project downloads nothing.

TokenValue
--font-family-base'Atkinson Hyperlegible Next', sans-serif'Instrument Sans', sans-serif'Nunito', sans-serif
--font-family-heading'Archivo', sans-serif'Bricolage Grotesque', sans-serif'Fraunces', serif
--font-family-mono'Atkinson Hyperlegible Mono', monospace'JetBrains Mono', monospace'JetBrains Mono', monospace

Sizes

Display and H1 to H3 have fluid versions that scale with the viewport. Everything from H4 down is fixed.

TokenValue
--font-size-body18px18px18px
--font-size-control16px16px16px
--font-size-small14px14px14px
--font-size-caption12px12px12px
--font-size-h164px64px64px
--font-size-displayclamp(2rem, 0.75rem + 5vw, 5rem)clamp(2rem, 0.75rem + 5vw, 5rem)clamp(2rem, 0.75rem + 5vw, 5rem)
--font-size-h1-fluidclamp(1.75rem, 0.75rem + 4vw, 4rem)clamp(1.75rem, 0.75rem + 4vw, 4rem)clamp(1.75rem, 0.75rem + 4vw, 4rem)
--font-size-h248px48px48px
--font-size-h2-fluidclamp(1.625rem, 1rem + 2.5vw, 3rem)clamp(1.625rem, 1rem + 2.5vw, 3rem)clamp(1.625rem, 1rem + 2.5vw, 3rem)
--font-size-h332px32px32px
--font-size-h3-fluidclamp(1.5rem, 1rem + 2vw, 2.5rem)clamp(1.5rem, 1rem + 2vw, 2.5rem)clamp(1.5rem, 1rem + 2vw, 2.5rem)
--font-size-h424px28px24px
--font-size-h520px20px20px

Weights

Weights by role. Title is the bold one, for small titles in card and dialog headers (decisions/0010 in the library).

TokenValue
--font-weight-body400400400
--font-weight-heading600800500
--font-weight-label500500500
--font-weight-display600800500
--font-weight-title700800500
--font-weight-control500500500

Line heights

Fixed line heights sit on a 4px grid. Display and heading use a ratio, so they follow the fluid sizes.

TokenValue
--line-height-display1.1251.1251.125
--line-height-body28px28px28px
--line-height-control24px24px24px
--line-height-small20px20px20px
--line-height-caption16px16px16px
--line-height-h180px80px80px
--line-height-h260px60px60px
--line-height-h340px40px40px
--line-height-h432px32px32px
--line-height-h524px24px24px
--line-height-heading1.251.251.25
--line-height-label16px16px16px

Letter spacing

Tighter for headings, slightly open for labels, wide for uppercase.

TokenValue
--letter-spacing-heading-0.03em-0.02em-0.01em
--letter-spacing-subheading-0.01em-0.01em-0.01em
--letter-spacing-body000
--letter-spacing-label0.01em0.01em0.01em
--letter-spacing-wide0.08em0.08em0.08em

Other

Tokens in this category that the groups above don’t cover yet.

TokenValue
--font-variation-heading'wdth' 112.5normal'SOFT' 100, 'WONK' 0

Usage

tsx
import { Heading } from '@amezquita/design-system/components/primitives/Heading'

// Visual size and document level are separate:
// a page title that looks like H2 but is the page's <h1>.
<Heading level={2} as="h1">Account settings</Heading>

/* In CSS, take size, weight and line-height as a set. */
.caption {
  font-size: var(--font-size-caption);
  font-weight: var(--font-weight-label);
  line-height: var(--line-height-caption);
}

Do and don’t

Do

  • Use Heading for headings, and set as when the outline level and the visual size differ.
  • Take size, weight and line height from the same step.
  • Keep running text at body size and within --size-container-text.

Don’t

  • Hardcode a line height. The linter rejects it in component CSS.
  • Skip heading levels to get a smaller look. Change level, keep the outline.
  • Set a font family in a component. A brand sets it once, in its tokens.