Typography
All text uses Geist and Geist Mono. Text roles bundle a family, size, line height and weight, so text always looks the same wherever it appears.
How to use type
-
Pick a text role and use all of its variables together. For example,
heading-lggives--heading-lg-font-family,--heading-lg-font-size,--heading-lg-line-heightand--heading-lg-font-weight. - Choose the role for what the text is, not for how big it should be. A heading element still needs the right level for its place on the page.
- Line heights sit on a 4 px grid, so text lines up with the spacing scale.
-
Sizes are in
rem, so all text follows the reader's font size setting. The two largest headings grow with the screen width.
Text roles
-
Designing with care
-
Designing with care
-
Designing with care
-
Designing with care
-
Good design is honest. It does not make a product appear more than it is.
-
Good design is honest. It does not make a product appear more than it is.
-
Save changes
-
Save changes
-
Case study
-
const theme = "dark";
Weights
Geist is a variable font, so any weight between 240 and 540 is available. The system uses three. Bold text,
such as <strong>, gets the heaviest one.
| Sample | Token | Value | Use |
|---|---|---|---|
| Aa |
--font-weight-delicate
|
240 | The lightest weight, for large display text. |
| Aa |
--font-weight-default
|
360 | Body text, interface text and form fields. |
| Aa |
--font-weight-robust
|
540 | Headings, labels and bold text. |
Font families
The fonts are self-hosted. Only Geist Variable is preloaded. Until it has loaded, a fallback based on Arial is shown, adjusted to take up the same space, so the page does not jump when Geist arrives. The browser never invents bold or italic: italic text uses Geist Variable Italic.
| Sample | Token | Stack |
|---|---|---|
| Aa Bb 0123 |
--font-family-sans
|
"Geist", "Geist Fallback", ui-sans-serif, system-ui, sans-serif |
| Aa Bb 0123 |
--font-family-mono
|
"Geist Mono", ui-monospace, "SFMono-Regular", "Menlo", "Monaco", "Consolas", "Liberation Mono", "Courier New", monospace |
Primitives
Raw values that the text roles point to. The name is the value in pixels, so --font-size-20 is
20 px. Use a text role instead of these.
| Token | Value |
|---|---|
--font-size-14
|
0.875rem
|
--font-size-16
|
1rem
|
--font-size-20
|
1.25rem
|
--font-size-30
|
1.875rem
|
--font-size-40
|
2.5rem
|
--font-size-24-30
|
clamp(1.5rem, 1.125rem + 1vw, 1.875rem)
|
--font-size-32-40
|
clamp(2rem, 1.75rem + 1vw, 2.5rem)
|
--line-height-20
|
1.25rem
|
--line-height-24
|
1.5rem
|
--line-height-28
|
1.75rem
|
--line-height-ratio-120
|
round(up, 1.2em, 0.25rem)
|
--font-weight-240
|
240
|
--font-weight-360
|
360
|
--font-weight-540
|
540
|
--letter-spacing-40
|
0.04em
|
--text-transform-uppercase
|
uppercase
|