Prerequisites
Before installing a Fonttrio pairing, ensure your project has:1
Next.js 14+ with App Router
Fonttrio pairings use
next/font/google for optimal font loading.2
shadcn/ui Installed
The shadcn CLI must be configured in your project.
3
Tailwind CSS
Tailwind should be configured as part of your Next.js or shadcn setup.
If you haven’t set up shadcn/ui yet, follow the official installation guide first.
Installation Command
Install any pairing using the shadcn CLI:editorial with any pairing name from the collection.
Package Manager Options
Fonttrio supports all major package managers:What Gets Installed
When you install a pairing, the shadcn CLI automatically adds the following to your project:1. Font Imports
Three font files are created in your project withnext/font/google imports:
2. Pairing Configuration
A pairing file that combines all three fonts:3. CSS Variables
The pairing adds CSS custom properties to yourglobals.css:
4. Typography Scale
CSS rules for all heading and body elements:Applying Fonts to Your Layout
After installation, apply the fonts in your root layout:app/layout.tsx
Using Fonts in Components
Once installed, use the CSS variables in your components:With Tailwind Classes
With Inline Styles
With CSS Modules
styles.module.css
Because the typography scale is applied globally via
globals.css, all <h1> through <h6> and <p> elements automatically use the pairing fonts. You only need to explicitly set fonts for custom components.Installation Options
The shadcn CLI provides several options for customizing the installation:Overwrite Existing Files
If you’ve already installed a pairing and want to replace it:Silent Mode
Skip confirmation prompts:Custom Path
Install to a different directory:Available Pairings
Here are some popular pairings you can install:Editorial
Minimal
Corporate
Impact
Protocol
Visit fonttrio.xyz to browse all 49 available pairings with live previews.
Verifying Installation
After installation, verify everything is set up correctly:1
Check Registry Files
Confirm the font files exist in
registry/fonts/ and the pairing exists in registry/pairings/.2
Check globals.css
Verify CSS variables and typography scale rules were added.
3
Update Layout
Add the font variables to your root layout as shown above.
4
Test in Browser
Run your dev server and inspect headings in the browser DevTools to confirm fonts are loading from Google Fonts.
Troubleshooting
Fonts Not Loading
If fonts aren’t appearing in your browser:- Check that font variables are added to the
<html>element in your layout - Verify
globals.cssis imported in your root layout - Clear your browser cache and reload
- Check the Network tab in DevTools to confirm Google Fonts are loading
CSS Variables Not Working
Ifvar(--font-heading) isn’t resolving:
- Ensure the font variables are applied to the
<html>element, not<body> - Check that the variable names match exactly (case-sensitive)
- Verify Tailwind is configured to recognize the arbitrary values
Existing Fonts Conflict
If you have existing font configurations:- Remove or comment out old font imports
- Clear the old CSS variables from
globals.css - Reinstall the Fonttrio pairing
- Update your layout to use the new font variables
Next Steps
Customize Typography
Adjust font sizes, weights, and spacing to match your design.
Mix Multiple Pairings
Learn how to install and switch between multiple pairings.