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.
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.
| Tier | Trigger | Body | Ratio |
|---|---|---|---|
| mobile | base | 16px | 1.125 |
| tablet | ≥ 640px | 17px | 1.2 |
| desktop | ≥ 1024px | 18px | 1.2 |
| cinema | data-scale="cinema" | 24px | 1.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-*).
| Role | Step | Mobile | Tablet | Desktop | Cinema | Line height |
|---|---|---|---|---|---|---|
--fs-hero | +8 | 42 | 72 | 76 | 144 | 1.05 |
--fs-display | +7 | 36 | 60 | 64 | 116 | 1.1 |
--fs-h1 | +6 | 32 | 52 | 52 | 92 | 1.15 |
--fs-h2 | +5 | 28 | 42 | 44 | 72 | 1.2 |
--fs-h3 | +4 | 26 | 36 | 38 | 60 | 1.25 |
--fs-h4 | +3 | 23 | 30 | 32 | 46 | 1.3 |
--fs-h5 | +2 | 20 | 24 | 26 | 38 | 1.35 |
--fs-h6, --fs-lead, --fs-body-lg | +1 | 18 | 20 | 22 | 30 | 1.4 to 1.5 |
--fs-body | 0 | 16 | 17 | 18 | 24 | 1.55 |
--fs-body-sm, --fs-small | -1 | 14 | 14 | 15 | 19 | 1.45 to 1.5 |
--fs-caption | -2 | 13 | 12 | 13 | 15 | 1.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: prettyon headings andbalanceon short blocks. Prism's prose components already do.
Live specimens
Display scale
Body & UI
Monospace & figures
Weights
Responsive roles
Prose
Quotes