Vanilla Breeze

font-pairer

Interactive font pairing tool with Google Fonts loading, live preview, curated suggestions, and CSS export.

Overview

The <font-pairer> component helps you discover and pair heading + body fonts. Select from a curated list of 30 Google Fonts organized by category, preview the pairing live, and export as CSS custom properties or @import statements. Part of the Design System Pack tooling.

Attributes

AttributeTypeDefaultDescription
heading-fontstringPlayfair DisplayGoogle Fonts family name for headings
body-fontstringInterGoogle Fonts family name for body text
samplestringThe Art of TypographyCustom sample heading text
show-exportbooleanShow Copy CSS and Copy @import toolbar
show-suggestionsbooleanShow curated pairing suggestion pills

Events

EventDetailWhen
font-pairer:change{ heading, body }Either font selection changes

Font Library

The curated font list includes 30 popular Google Fonts across four categories:

CategoryFonts
SerifPlayfair Display, Merriweather, Lora, Source Serif 4, Libre Baskerville, Crimson Text, DM Serif Display, Cormorant Garamond
Sans-SerifInter, Open Sans, Roboto, Lato, Nunito, Work Sans, DM Sans, Plus Jakarta Sans, Space Grotesk, Manrope, IBM Plex Sans, Outfit
DisplayBebas Neue, Abril Fatface, Oswald, Sora, Fraunces
MonospaceJetBrains Mono, Fira Code, IBM Plex Mono, Source Code Pro

Curated Pairings

When show-suggestions is set, the component displays 12 pre-tested font pairings as clickable pills:

Export Formats

Two export options:

  • Copy CSS--font-heading: "Playfair Display", serif; + --font-body: "Inter", sans-serif;
  • Copy @import — Full Google Fonts @import url(...) statements for both fonts with all available weights

Design System Workflow

Pair this tool with the Palette Generator and Gradient Builder to explore your design system's visual identity:

  1. Pick heading + body fonts that match your brand personality
  2. Copy the CSS and paste into your theme file as --font-heading and --font-body tokens
  3. The fonts will cascade to all VB components automatically