TokensReference

Typography tokens

The type scale and font primitives every component reads from — --wr-text-* sizes, --wr-font-family-* faces, plus weight, line-height, and letter-spacing scales. Looking for guidance on *how* to apply type in apps? See the Typography section instead — this page is the token reference.

Type scale

Nine --wr-text-* steps, named like a t-shirt scale and rooted at --wr-text-base (1rem = 16px). Reference the token, never a raw px — sizes then stay consistent and respond to a root font-size change in one place.

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

Using the tokens

Pull sizes and faces straight from the custom properties. Pair --wr-text-* with a --wr-leading-* line-height and a --wr-font-weight-* weight for a complete type ramp.

.card-caption {
  font-family: var(--wr-font-family-base);
  font-size: var(--wr-text-sm); /* 14px */
  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); /* 12px */
}

Font families

The library ships only system-font fallback chains. Override these on :root to ship your own typeface — every component re-reads them, so one change reskins the whole catalog.

--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

NameDescriptionTypeDefault
--wr-font-family-baseDefault UI typeface. Apps shipping a custom face override this on :root after loading the theme.system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif
--wr-font-family-monoMonospace face for code, numerics, and tabular data.ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace
/* Ship your own typeface — override the family tokens on :root
   after loading the theme; every component re-reads them. */
:root {
  --wr-font-family-base: 'Inter', system-ui, sans-serif;
  --wr-font-family-mono: 'JetBrains Mono', ui-monospace, monospace;
}

Font weights

A --wr-font-weight-* ramp from thin (200) to extrabold (800). Body copy sits at regular (400); labels and headings step up from there.

NameDescriptionTypeDefault
--wr-font-weight-thinThin.200
--wr-font-weight-lightLight.300
--wr-font-weight-regularRegular — body default.400
--wr-font-weight-mediumMedium — labels, emphasis.500
--wr-font-weight-semiboldSemibold — subheadings.600
--wr-font-weight-boldBold — headings.700
--wr-font-weight-extraboldExtrabold — display.800

Line height

Unitless --wr-leading-* multipliers — they scale with the element's own font-size. normal (1.5) is the body default.

NameDescriptionTypeDefault
--wr-leading-noneNo leading — tight display headings.1
--wr-leading-tightTight.1.25
--wr-leading-snugSnug.1.375
--wr-leading-normalNormal — body default.1.5
--wr-leading-relaxedRelaxed.1.625
--wr-leading-looseLoose.2

Letter spacing

--wr-tracking-* offsets in em, so tracking tracks the font-size. Tighten large display text, widen uppercase eyebrows and badges.

NameDescriptionTypeDefault
--wr-tracking-tighterTighter — large display text.-0.05em
--wr-tracking-tightTight — headings.-0.025em
--wr-tracking-normalNormal — body default.0
--wr-tracking-wideWide.0.025em
--wr-tracking-widerWider.0.05em
--wr-tracking-widestWidest — uppercase eyebrows, badges.0.1em