Typography

Geist Sans for UI text, Geist Mono for code. A custom type scale from 2xs to jumbo with strict tracking rules for precise typographic control.


Scale

Eleven sizes from 2xs (11px) to jumbo (45px), finer than Tailwind below base. Most interface text lives between xs and lg.

On a screen

The settings screen from the Spacing page, with every run of text marked by its size step and weight.

Settings

Your profile and your plan.

Profile

How your team sees you.

JD

Jane Doe

jane@example.com

Shown on comments and invites.

Plan

Pro, billed yearly.

Seats
3 of 5
2 open
Storage
18 GB
Of 50 GB

Seats reset on 1 December.

Every size

Each step at its true size, with what it is for, its line height and its tracking. Headings inside Prose read from the same steps.

StepSample and useSize
2xs

The quick brown fox

Dense metadata

14.85px (snug) line height, -0.01em tracking

11px
1xs

The quick brown fox

Fine print and eyebrows

16.2px (snug) line height, -0.01em tracking

12px
xs

The quick brown fox

Help text and small notes

19.5px (normal) line height, -0.01em tracking

13px
sm

The quick brown fox

Captions, labels and table text. Prose h5 and h6

21px (normal) line height, -0.01em tracking

14px
base

The quick brown fox

Body copy. Prose h4

23.25px (normal) line height, -0.01em tracking

15.5px
field

The quick brown fox

Form fields on phones only, so iOS does not zoom on focus

24px (normal) line height, -0.01em tracking

16px
lg

The quick brown fox

Lead paragraphs. Prose h3

24.3px (snug) line height, -0.01em tracking

18px
xl

The quick brown fox

Subheads. Prose h2

27px (snug) line height, -0.01em tracking

20px
2xl

The quick brown fox

Page titles. Prose h1

32.4px (snug) line height, -0.01em tracking

24px
3xl

The quick brown fox

Large page titles

37.8px (snug) line height, -0.01em tracking

28px
display

The quick brown fox

Hero headlines

43.92px (1.22) line height, -0.025em tracking

36px
jumbo

The quick brown fox

The largest hero headline

48.15px (1.07) line height, -0.025em tracking

45px

Faces and weights

Two families, one for interface and one for code, in four weights.

Font families

Both are variable fonts from the geist package, which keeps the letterform sets that rebuilt copies strip out.

Components

ABCDEFGHIJKLMNOPQRSTUVWXYZ
abcdefghijklmnopqrstuvwxyz
0123456789

font-sansGeist Sans

Interface text, from micro labels to display headings

npx shadcn add

ABCDEFGHIJKLMNOPQRSTUVWXYZ
abcdefghijklmnopqrstuvwxyz
0123456789

font-monoGeist Mono

Code, terminal commands, data labels and technical values

Wiring the font

A font cannot wire itself. Add these two lines to your root layout once:

import { GeistSans } from "geist/font/sans"
import { GeistMono } from "geist/font/mono"

<html className={`${GeistSans.variable} ${GeistMono.variable}`}>

Those exports load the upright file only, so an italic is the browser slanting it. If you set italic text anywhere, load the real italic faces with next/font/local (steps in docs/ui-md-rules.md, under “The typeface is part of the system”). Once every italic has a real face, add font-synthesis: none to body.

Weights

Body copy is Regular, and Semibold carries headings and button labels.

WeightUsageValue
RegularBody copy and Prose400
MediumRow names, badges, small labels500
SemiboldHeadings, titles, button labels600
BoldRare. The Brand wordmark option700

Adjusting a line

Each size sets its own line height and tracking. These are the classes for the cases where it should not.

Changing line height

A title at text-base or smaller adds leading-snug, text-lg set as copy adds leading-normal, and a title over its description takes leading-tight.

ClassSpecimenValue
leading-tight

A title over its description reads as one thought. The two lines sit close because the title's leading is tight, so the gap between them stays small.

1.25
leading-snug

Headings from text-lg up already ship this. A small title adds it by hand, because its size is chosen for body text and would otherwise get 1.5 leading.

1.35
leading-normal

Body copy and UI text. It is also the right leading when text-lg is a paragraph, not a heading, since the heading value reads too tight at reading length.

1.5
leading-none

A single line only, never text that can wrap.

1

Changing letter spacing

Display sizes tighten themselves, and uppercase labels open up.

ClassUsageValue
tracking-tightBy hand only on text-2xl or text-3xl set as display type-0.025em
tracking-wideUppercase labels, overlines0.08em (8%)

Line length

Three caps keep lines short. The heading caps pair their own wrap, so never type text-balance on a heading. Balance only suits centred text or a box that hugs its text.

ClassUsageValue
max-w-measureBody copy. Also sets text-wrap: pretty, so a last line never ends on one stray word60ch
max-w-measure-headingDisplay headings, so a short hero wraps short24ch
max-w-measure-heading-relaxedHeadings below display size, such as a full-sentence section title32ch

Trimming a heading

cap-trim cuts the empty space above a heading's capitals and below its baseline, so a gap measures from the letters. Pair it with the matching rung. PageHeader and dialog titles already do.

RungUsageValue
pairAn untrimmed title over a smaller line, both leading-tight4px
trim-pairA cap-trim title over its description12px
trim-pair-displayA cap-trim display headline: 17px under 36px type. Use PageHeader size display, which sets it8px + 0.25em

In use

How the sizes combine: common pairings, and a full article.

Pairings

A title and the lines under it, with the classes each line takes.

Page header

A concise description that explains what this page is about and what the user can do here.

text-3xl font-semibold tracking-tight

text-base text-muted-foreground

Card header

Supporting text that provides additional context below the title.

text-base font-semibold leading-tight

text-sm text-muted-foreground

Section title

Section body text at the default size with normal line height for comfortable reading.

Tertiary info like a timestamp or metadata

text-xl font-semibold

text-sm text-muted-foreground

text-xs text-subtle-foreground

Overline label

Content beneath an overline label, often in a sidebar or settings panel.

text-1xs font-semibold uppercase tracking-wide text-muted-foreground

text-sm text-muted-foreground

Long-form prose

A full article: how headings, body, lists, links and code read together.

Typography is the voice of the interface

Good type is invisible. It serves the reader without asking for attention. This is how the system composes at reading length.

Every interface is a sequence of typographic decisions. Size, weight, tracking, and rhythm do most of the work before color or layout ever get a turn. A system that gets type right feels calm; a system that gets it wrong feels noisy no matter how many other details are polished.

The scale here spans eleven sizes, from text-2xs for dense metadata up to text-jumbo for marketing moments. Most of your UI will live between text-xs and text-lg.

Hierarchy, not decoration

Headings exist to help the eye skim, not to announce importance. Use them sparingly, and let weight and size carry the structure. When every heading shouts, none of them do.

A few rules worth internalizing:

  • Never skip levels: an h2 follows an h1, not an h3.
  • Keep measure tight: body copy caps at 60 characters per line.
  • Trust the scale: if a size doesn’t exist in the system, extend the scale rather than reach for an arbitrary value.

A typical workflow

When composing a new page, start from the outside in:

  1. Pick the page-level heading size first: this anchors everything else.
  2. Set the body size and line height to match the reading context.
  3. Fill in supporting sizes last: overlines, captions, metadata.

For inline emphasis, prefer semantic weight over italics. Links should feel like links: we use underlined accent color so they read clearly in both paragraphs and lists.

Typography has one plain duty before it and that is to convey information in writing.
Emil Ruder

Code in prose

Inline tokens like font-semibold or leading-snug sit comfortably mid-sentence. Longer examples get their own block:

import { Button } from "@/components/ui/button"

export function SaveButton() {
  return <Button>Save changes</Button>
}

The body font is Geist Sans and code uses Geist Mono. Both are variable fonts, so weights blend cleanly across the whole scale.

font-sans is a chain: your override, then Geist Sans, then the system UI font. Wire the geist npm package once and you get Geist, free. That is the kit’s default and no component ships or requires a licensed typeface. This site sets no override at all, which is the point: every specimen on this page is the default, so what you are reading is exactly what a fresh install renders. Nothing here flatters the kit with a face you would not get. The kit also sets Geist’s letterforms for you, on body: single-storey a, straight l, straight-leg R, alternate i and j, and tabular figures so a number that ticks does not reflow the text beside it. Because font-feature-settingsreplaces rather than merges, re-declaring it on an element switches off everything you leave out. Two catches if you do swap the face. A font package built from Google’s sources is stripped of its OpenType features, so a face chosen for its alternates will quietly arrive without them. And those set numbers name specific alternates in Geist and mean something else in another family, so re-declare the list against your own font.


This specimen is itself rendered with the system’s tokens: no custom typography CSS. If a line looks off here, it’ll look off everywhere.