Home /

docs

Typography

Control fonts, heading sizes, weights, line heights, and letter spacing — all from config.

Font Families

docs.config.tsx
typography: {
  font: {
    style: {
      sans: "var(--font-geist-sans, system-ui, sans-serif)",
      mono: "var(--font-geist-mono, ui-monospace, monospace)",
    },
  },
},

Heading Styles

Each heading level can be individually configured:

heading-styles.tsx
typography: {
  font: {
    h1: { size: "2.25rem", weight: 700, letterSpacing: "-0.025em" },
    h2: { size: "1.5rem", weight: 600, letterSpacing: "-0.015em" },
    h3: { size: "1.25rem", weight: 600 },
    h4: { size: "1.125rem", weight: 600 },
    body: { size: "0.975rem", lineHeight: "1.8" },
    small: { size: "0.875rem", lineHeight: "1.5" },
  },
},

Font Style Properties

PropertyTypeDescription
sizestringCSS font-size (e.g. "2rem")
weightnumberFont weight (e.g. 700)
lineHeightstringLine height (e.g. "1.2")
letterSpacingstringLetter spacing (e.g. "-0.02em")

Using Google Fonts

Load fonts in your app/layout.tsx and reference them via CSS variables:

app/layout.tsx
import { Geist, Geist_Mono } from "next/font/google";

const geistSans = Geist({
  variable: "--font-geist-sans",
  subsets: ["latin"],
});

const geistMono = Geist_Mono({
  variable: "--font-geist-mono",
  subsets: ["latin"],
});

// Apply variables to <body>
<body className={`${geistSans.variable} ${geistMono.variable}`}>

Then reference them in your typography config:

using-google-fonts.tsx
font: {
  style: {
    sans: "var(--font-geist-sans)",
    mono: "var(--font-geist-mono)",
  },
}
Customize
Live preview on these docs
Reset
Customize
Export Code
Preset
Explore more themes
Primary Color
Primary
Colors
Background
Foreground
Muted Text
Border
Card
Muted BG
Ring
Layout
SidebarBordered
TOC StyleDirectional (tree)
TOC DepthH2 + H3
Ask AI
ModeFloating
Floating StyleFull Modal
PositionBottom Right
Features