Typography

A fluid, golden-ratio type system: ten size steps, φ-derived line-heights, a tracking scale, and six runtime-switchable font families — all driven by --vd-* tokens.

Golden-ratio type scale
Every two steps multiply by φ (1.618). The scale steps by √φ ≈ 1.272, so each pair of steps lands on the golden ratio: 16 → 26 → 42 → 68 px. Sizes lg and up use clamp() to scale fluidly between a mobile (≈1.414, augmented fourth) and desktop (φ) ratio — no breakpoints needed.
Aa--vd-font-size-6xl54→86px
Aa--vd-font-size-5xl45→68px
Aa--vd-font-size-4xl37→53px
The quick brown fox--vd-font-size-3xl31→42px
The quick brown fox--vd-font-size-2xl26→33px
The quick brown fox jumps--vd-font-size-xl22→26px
The quick brown fox jumps over--vd-font-size-lg18→20px
The quick brown fox jumps over the lazy dog--vd-font-size-base16px
The quick brown fox jumps over the lazy dog--vd-font-size-sm13px · fib
The quick brown fox jumps over the lazy dog--vd-font-size-xs10px

Utility classes .vd-text-xs … .vd-text-6xl apply each step. See the Golden Ratio page for the proportional system these derive from.

Type-scale playground

Type your own copy and drag through the scale — the preview, the utility class, and the size update live.

.vd-text-base16px
The quick brown fox jumps over the lazy dog
Line height (leading) — φ-derived

Line-heights come straight from φ: 1.236 (2/φ), 1.382, 1.5, and 1.618 (φ itself).

tight · 1.236

VD3 UI keeps vertical rhythm tied to the golden ratio so dense headings and body copy feel balanced without hand-tuning every block.

normal · 1.5

VD3 UI keeps vertical rhythm tied to the golden ratio so dense headings and body copy feel balanced without hand-tuning every block.

relaxed · 1.618 (φ)

VD3 UI keeps vertical rhythm tied to the golden ratio so dense headings and body copy feel balanced without hand-tuning every block.

Letter spacing (tracking)

Six tracking tokens, from tighter to widest.

tighter · −0.05em
VD3 UI
normal · 0
VD3 UI
wider · 0.05em
VD3 UI
widest · 0.1em
VD3 UI

Applied via the --vd-letter-spacing-* tokens.

Headings

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6
Weights & styles

Light · .vd-font-light (300)

Normal · .vd-font-normal (400)

Medium · .vd-font-medium (500)

Semibold · .vd-font-semibold (600)

Bold · .vd-font-bold (700)

Extrabold · .vd-font-extrabold (800)

Italic · .vd-text-italic

Font families & runtime switching
Fonts are no longer bundled (v1.8.2).data-font still switches the stack. The .woff2 files are yours to host — only the faces you offer, or system if you want no files at all.

That keeps the package smaller, so installs do not carry families a page never downloads. It also keeps font licensing, subsetting, and weight updates in the app instead of inside the library. Register any family with fontOptions or the Theme Customizer fonts prop.

VD3 UI ships 6 curated font options, switchable at runtime via the data-font attribute on <html> (also exposed by the Theme Customizer). The preference persists in localStorage.vanduo-font-preference.

  • ubuntu — default humanist sans-serif
  • open-sans — neutral, highly readable
  • lato — friendly, rounded sans-serif
  • nunito — rounded, friendly sans-serif
  • jetbrains-mono — monospace for code
  • system — native system stack (same as omitting data-font)
<!-- Set a curated font on the document -->
<html data-font="ubuntu">

<!-- Add your own: register a stack on the attribute -->
<style>
  [data-font="roboto"] { --vd-font-family-sans: 'Roboto', sans-serif; }
</style>

Self-hosting steps and the Google Fonts CDN path are covered in CSS Variables & Theming. For minimum readable sizes and contrast, see Accessibility Essentials.

API Reference

Class / TokenDescriptionType
.vd-text-xs … .vd-text-6xlApply a step of the golden-ratio type scale.Utility
.vd-font-light … .vd-font-extraboldFont weight, 300–800.Utility
.vd-text-italicItalic font style.Utility
--vd-line-height-{tight,snug,normal,relaxed,loose}φ-derived leading tokens (1.236 → 2).Token
--vd-letter-spacing-{tighter…widest}Tracking tokens (−0.05em → 0.1em).Token
data-font="[name]"Curated font stack on <html> (ubuntu, open-sans, lato, nunito, jetbrains-mono, system).Attribute