GuideTokensReferenceUpdated in v15

Typography tokens

Set type in your own styles with ngwr's font tokens.

Type scale

Each size has a line height: --wr-text-{size}-leading.

--wr-text-xs0.75rem · 12px · leading 1rem
Ag
--wr-text-sm0.875rem · 14px · leading 1.25rem
Ag
--wr-text-base1rem · 16px · leading 1.5rem
Ag
--wr-text-lg1.125rem · 18px · leading 1.75rem
Ag
--wr-text-xl1.25rem · 20px · leading 1.75rem
Ag
--wr-text-2xl1.5rem · 24px · leading 2rem
Ag
--wr-text-3xl1.875rem · 30px · leading 2.25rem
Ag
--wr-text-4xl2.25rem · 36px · leading 2.5rem
Ag
--wr-text-5xl3rem · 48px · leading 1
Ag

Usage

.card-caption {
  font-size: var(--wr-text-sm);
  font-weight: var(--wr-font-weight-medium);
  line-height: var(--wr-leading-normal);
  letter-spacing: var(--wr-tracking-normal);
}

.code-inline {
  font-family: var(--wr-font-family-mono);
  font-size: var(--wr-text-xs);
}

Font families

System fonts by default. Override them on :root to use your own.

--wr-font-family-base

The quick brown fox jumps over the lazy dog — 0123456789

--wr-font-family-mono

const x = 42; // the quick brown fox — 0123456789

:root {
  --wr-font-family-base: 'Inter', system-ui, sans-serif;
  --wr-font-family-mono: 'JetBrains Mono', ui-monospace, monospace;
}

Weight, line height, letter spacing

Every value, with its utility class, is on Typography styles.

See also