Skip to main content

Typography

Type waterfall​

Every role on the scale, the three families and the weights, rendered live from the tokens. Each line is annotated with its token and size. Switch the signature, theme or density to see the same roles re-skin.

Signature
Density
Viewport
Theme and light/dark are set in the top bar
Live demo
Open ↗

Families​

  • Display and headings: Roboto Flex, a variable face with a wide optical-size and weight range.
  • Body and UI: Atkinson Hyperlegible Next. It keeps similar letterforms distinct, which helps every reader and low-vision readers most.
  • Mono: Atkinson Hyperlegible Mono, for code, data and tabular figures.

Reference them through --font-display, --font-body and --font-mono, never by name. Themes re-point these three tokens: Industry sets Geist and Geist Mono, Enterprise sets IBM Plex. Components pick the change up with no code of their own.

A modular scale​

Prism does not have a list of font sizes. It has a body size and a ratio per device tier, and every role is the body size multiplied by the ratio a whole number of times. No other size can exist.

TierTriggerBodyRatio
mobilebase16px1.125
tablet≥ 640px17px1.2
desktop≥ 1024px18px1.2
cinemadata-scale="cinema"24px1.25

The scale is tighter on a phone, where there is little room for contrast between sizes, and wider on a television, where headings must carry across a room.

Role tokens​

Size text with a role, not a number. Each role has a matching line height (--lh-*) and letter spacing (--ls-*).

RoleStepMobileTabletDesktopCinemaLine height
--fs-hero+84272761441.05
--fs-display+73660641161.1
--fs-h1+6325252921.15
--fs-h2+5284244721.2
--fs-h3+4263638601.25
--fs-h4+3233032461.3
--fs-h5+2202426381.35
--fs-h6, --fs-lead, --fs-body-lg+1182022301.4 to 1.5
--fs-body0161718241.55
--fs-body-sm, --fs-small-1141415191.45 to 1.5
--fs-caption-2131213151.4

Sizes are in pixels here for reading; the tokens are rem, so the reader's own text-size setting always wins. Nothing goes below 12px.

Large roles are set tighter: letter spacing runs from -0.03em at hero to 0 at body and opens slightly for captions.

The older --text-* names​

--text-xs through --text-9xl still work. They are deprecated aliases onto the same steps, so existing CSS reflows with the tiers. New code uses the --fs-* roles.

Where the scale comes from​

One file, tokens/scale.config.json, holds the body sizes, ratios and role steps. The CSS tokens, both Tailwind themes and the React Native role layer are generated from it. To change the scale, change that file and regenerate; never edit tokens/scales.css by hand.

Weights​

--weight-regular (400), --weight-medium (500), --weight-semibold (600) and --weight-bold (700).

Rules​

  • One display weight per view. Hierarchy comes from size and space, not from stacking weights.
  • Body copy stays at --fs-body. Do not shrink it to fit; if text does not fit, the layout is wrong.
  • Keep running text to a measure of about 45 to 75 characters.
  • Use text-wrap: pretty on headings and balance on short blocks. Prism's prose components already do.

Live specimens​

Display scale

Live demo
Open ↗

Body & UI

Live demo
Open ↗

Monospace & figures

Live demo
Open ↗

Weights

Live demo
Open ↗

Responsive roles

Live demo
Open ↗

Prose

Live demo
Open ↗

Quotes

Live demo
Open ↗