Tailwind Setup

Register 'Font Name' as a utility class (font-font) — pick the config style that matches your project.

Load from catalog

Classic Config

tailwind.config.js

JS-based config — works on Tailwind v3, and on v4 in JS-config compatibility mode.

// tailwind.config.js — classic JS config
/** @type {import('tailwindcss').Config} */
module.exports = {
  theme: {
    extend: {
      fontFamily: {
        font: ['Font Name', 'sans-serif'],
      },
    },
  },
};

CSS-First Config

Tailwind v4+

Native @theme syntax — no config file, everything lives in CSS.

/* globals.css — Tailwind v4+ CSS-first config */
@import "tailwindcss";

/* Add at least one font file URL below to embed a real @font-face block */

@theme {
  --font-font: 'Font Name', sans-serif;
}

/* Usage: <p className="font-font">...</p> */