GuideThemingtypographyfontsfont-pairingnuxt-uidesign

Typography & Font Pairing for Nuxt Apps

How to choose, pair, and apply fonts in Nuxt UI v4 applications using Nuxt Fonts and CSS variables for cohesive typography.

Typography sets the tone of your application before a single word is read. The right font pairing communicates professionalism, friendliness, or creativity - the wrong one creates visual noise.

Nuxt UI v4 uses CSS variables for font families, making it straightforward to apply custom typography to your entire application.

How Fonts Work in Nuxt UI

Nuxt UI references these CSS variables for typography:

:root {
  --font-sans: "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

Every Nuxt UI component that renders text uses --font-sans. Code blocks and monospace elements use --font-mono.

Override these variables to change the typeface globally - no need to modify individual components.

Choosing a Font Strategy

Option 1: System Fonts (Fastest)

Zero network requests, zero layout shift:

:root {
  --font-sans: ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, "SF Mono", monospace;
}

Best for: performance-critical apps, utility tools, dashboards.

Option 2: Single Web Font (Balanced)

One font family with variable weight:

:root {
  --font-sans: "Inter", ui-sans-serif, system-ui, sans-serif;
}

Best for: most applications. Inter, DM Sans, or Geist are safe choices.

Option 3: Font Pair (Expressive)

Distinct heading and body fonts:

:root {
  --font-sans: "DM Sans", ui-sans-serif, sans-serif;
  --font-heading: "Space Grotesk", ui-sans-serif, sans-serif;
}

Best for: marketing sites, branded experiences, content-heavy pages.

Tested combinations that work well with Nuxt UI components:

Sans-Serif Pairings

Heading FontBody FontCharacter
Space GroteskDM SansModern, geometric, tech
Plus Jakarta SansInterProfessional, clean, SaaS
Bricolage GrotesqueNunitoFriendly, approachable
SoraPublic SansMinimal, startup
UrbanistLatoElegant, contemporary
OutfitWork SansBold, editorial

Serif + Sans Pairings

Heading FontBody FontCharacter
Playfair DisplayDM SansLuxury, editorial
LoraInterAcademic, trustworthy
DM Serif DisplayPublic SansBold, premium
Source Serif 4Source Sans 3Matching family, cohesive
MerriweatherOpen SansClassic, readable

Monospace Accents

For code-related apps or to add a technical accent:

PrimaryMonoCharacter
InterJetBrains MonoDeveloper tools
DM SansFira CodeCode editors, terminals
GeistIBM Plex MonoTechnical documentation
Space GroteskSpace MonoMatching family, geometric

Loading Fonts in Nuxt

Nuxt Fonts (@nuxt/fonts) auto-detects and optimizes font loading. Define your fonts in nuxt.config.ts:

export default defineNuxtConfig({
  fonts: {
    families: [
      { name: "Inter", provider: "google", global: true },
      { name: "JetBrains Mono", provider: "google", global: true },
    ],
  },
});

Then reference them in your CSS:

:root {
  --font-sans: "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

Typography Best Practices

Line Height

ContextLine HeightExample
Headings1.1–1.3leading-tight
Body text1.5–1.75leading-relaxed
UI labels1.25leading-snug

Font Size Scale

Stick to a consistent type scale. Tailwind's default scale works well:

ElementSizeClass
Display heading48pxtext-5xl
Page heading30pxtext-3xl
Section heading24pxtext-2xl
Subheading20pxtext-xl
Body16pxtext-base
Small / caption14pxtext-sm
Tiny / label12pxtext-xs

Font Weight Usage

WeightPurpose
400 (regular)Body text
500 (medium)Labels, nav items
600 (semibold)Subheadings, button text
700 (bold)Headings, emphasis

Preview Fonts in the Theme Builder

The Nuxt UI Theme Builder includes a font selector with 30+ pre-loaded Google Fonts. Select a font, see it applied to every component instantly, and export the configuration.

To judge a font on long-form text, preview it on the Blog and Changelog templates.

Next Steps