Function Signature
function getAllPairings () : PairingData []
Description
Returns the complete array of all font pairings available in Fonttrio. This function provides access to the entire curated collection of typography combinations, each with detailed configuration including heading fonts, body fonts, monospace fonts, mood tags, use cases, and typography scales.
Parameters
This function takes no parameters.
Return Value
An array of all available font pairings. Each PairingData object contains: Show PairingData properties
Unique identifier for the pairing (e.g., “agency”, “architect”)
Font family name for headings (e.g., “Schibsted Grotesk”)
Category of the heading font: "serif", "sans-serif", or "monospace"
Font family name for body text (e.g., “Karla”)
Category of the body font: "serif", "sans-serif", or "monospace"
Font family name for monospace/code text (e.g., “Fira Code”)
Array of mood tags (e.g., [“minimal”, “nordic”])
Array of recommended use cases (e.g., [“agency”, “design”, “portfolio”])
Human-readable description of the pairing’s aesthetic and personality
Complete typography scale with configurations for h1-h6 and body text, including size, weight, line height, and letter spacing
Ready-to-use Google Fonts URL with all required font weights
Usage Examples
Basic Usage
List All Pairing Names
Display Pairing Options
Filter by Font Category
Get Google Fonts URLs
import { getAllPairings } from '@/lib/pairings' ;
const allPairings = getAllPairings ();
console . log ( `Total pairings available: ${ allPairings . length } ` );
Example Response
[
{
"name" : "agency" ,
"heading" : "Schibsted Grotesk" ,
"headingCategory" : "sans-serif" ,
"body" : "Karla" ,
"bodyCategory" : "sans-serif" ,
"mono" : "Fira Code" ,
"mood" : [ "minimal" , "nordic" ],
"useCase" : [ "agency" , "design" , "portfolio" ],
"description" : "Nordic minimalism meets grotesque warmth. Schibsted Grotesk's Scandinavian clarity in headlines paired with Karla's quirky grotesque personality for body text that feels human." ,
"scale" : {
"h1" : {
"size" : "2.25rem" ,
"weight" : 700 ,
"lineHeight" : "1.15" ,
"letterSpacing" : "-0.03em"
},
"h2" : {
"size" : "1.875rem" ,
"weight" : 600 ,
"lineHeight" : "1.2" ,
"letterSpacing" : "-0.025em"
},
"body" : {
"size" : "1rem" ,
"lineHeight" : "1.6" ,
"weight" : 400
}
},
"googleFontsUrl" : "https://fonts.googleapis.com/css2?family=Schibsted+Grotesk:wght@400;500;600;700&family=Karla:wght@400;500;600&family=Fira+Code:wght@400;500&display=swap"
}
]
Notes
Performance : This function returns the entire pairings array. The data is loaded once from pairings-data.ts and cached in memory, making subsequent calls very fast.
Data Source : The pairings data is auto-generated from registry/pairings/*.json files. Do not edit lib/pairings-data.ts manually.