Typography

The type scale and how to reference it.

Type ships as a scale of semantic steps from @base-org/bds-tokens — each a font size, line height, and weight bundled under one token. Reference a step by name rather than composing sizes by hand, and text stays consistent across every surface. This documentation is set in the same scale.

<p className="text-body">Body copy</p>
<h2 className="text-title-1">A section heading</h2>
<span className="text-label-medium">A field label</span>
Displaytext-display · 2rem · 400 · 2.25rem
Title 1text-title-1 · 1.5rem · 400 · 2rem
Title 2text-title-2 · 1.25rem · 400 · 1.75rem
Title 3text-title-3 · 1rem · 400 · 1.5rem
Headlinetext-headline · 0.875rem · 400 · 1.25rem
Bodytext-body · 0.875rem · 300 · 1.25rem
Label Mediumtext-label-medium · 0.75rem · 400 · 1.125rem
Label Regulartext-label-regular · 0.75rem · 300 · 1.125rem
Footnotetext-footnote · 0.625rem · 300 · 1rem

Choosing a step

StepUse for
displayThe single largest moment on a page — a hero or empty-state headline.
title-1 – title-3Section and subsection headings, in descending order.
headlineA label that needs more weight than body without changing size.
bodyRunning text and most UI copy.
label-mediumField labels, table headers, and emphasized captions.
label-regularSecondary labels and captions.
footnoteFine print and dense metadata.

Usage

Do

Reference a step by token — text-title-1, text-body — so size, line height, and weight move together and stay in sync with the system.

Don't

Compose type from arbitrary text-[..] sizes and weights. It drifts from the scale and breaks the vertical rhythm the tokens are tuned for.

Font

The scale is set in Base Sans (Google Sans Flex in the product components). It carries exactly two weights — Light (300) for body copy and Regular (400) for headings and emphasis — so hierarchy reads as a change in size, and occasionally weight, but never a jump to bold.

Guidelines

Defaults for setting text in BDS components and product UI. See the Guidelines overview for how to apply them.

Fonts and rendering

  • Use .woff2 web fonts only, never .ttf or .otf.
  • Set -webkit-font-smoothing: antialiased and -moz-osx-font-smoothing: grayscale on the root layout for sharper text.

Numbers

  • Use font-variant-numeric: tabular-nums in timers, counters, prices, and tables (skip it if the font is already monospace).

Line length and wrapping

  • Keep long-form text lines to 60–75 characters wide.
  • Use text-wrap: balance on headings and text-wrap: pretty on descriptions; use neither on long-form text.
  • Use overflow-wrap: break-word for long words, links, and IDs; use white-space: nowrap for labels and badges.
  • When text is truncated with an ellipsis, make the full text available via a tooltip or an expanded view.

Punctuation and decoration

  • Use smart punctuation: curly quotes, en dash (–) for ranges, em dash (—) for asides, ellipsis (…).
  • Use text-underline-position: from-font and text-decoration-skip-ink: auto so underlines don't cross descenders.
  • Store text with normal capitalisation and apply uppercase or lowercase with text-transform, never by typing the string in caps.