> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/kapishdima/fonttrio/llms.txt
> Use this file to discover all available pages before exploring further.

# getAllPairings

> Retrieve all available font pairings from the Fonttrio registry

## Function Signature

```typescript theme={null}
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

<ResponseField name="return" type="PairingData[]">
  An array of all available font pairings. Each `PairingData` object contains:

  <Expandable title="PairingData properties">
    <ResponseField name="name" type="string" required>
      Unique identifier for the pairing (e.g., "agency", "architect")
    </ResponseField>

    <ResponseField name="heading" type="string" required>
      Font family name for headings (e.g., "Schibsted Grotesk")
    </ResponseField>

    <ResponseField name="headingCategory" type="FontCategory" required>
      Category of the heading font: `"serif"`, `"sans-serif"`, or `"monospace"`
    </ResponseField>

    <ResponseField name="body" type="string" required>
      Font family name for body text (e.g., "Karla")
    </ResponseField>

    <ResponseField name="bodyCategory" type="FontCategory" required>
      Category of the body font: `"serif"`, `"sans-serif"`, or `"monospace"`
    </ResponseField>

    <ResponseField name="mono" type="string" required>
      Font family name for monospace/code text (e.g., "Fira Code")
    </ResponseField>

    <ResponseField name="mood" type="string[]" required>
      Array of mood tags (e.g., \["minimal", "nordic"])
    </ResponseField>

    <ResponseField name="useCase" type="string[]" required>
      Array of recommended use cases (e.g., \["agency", "design", "portfolio"])
    </ResponseField>

    <ResponseField name="description" type="string" required>
      Human-readable description of the pairing's aesthetic and personality
    </ResponseField>

    <ResponseField name="scale" type="TypographyScale" required>
      Complete typography scale with configurations for h1-h6 and body text, including size, weight, line height, and letter spacing
    </ResponseField>

    <ResponseField name="googleFontsUrl" type="string" required>
      Ready-to-use Google Fonts URL with all required font weights
    </ResponseField>
  </Expandable>
</ResponseField>

## Usage Examples

<CodeGroup>
  ```typescript Basic Usage theme={null}
  import { getAllPairings } from '@/lib/pairings';

  const allPairings = getAllPairings();
  console.log(`Total pairings available: ${allPairings.length}`);
  ```

  ```typescript List All Pairing Names theme={null}
  import { getAllPairings } from '@/lib/pairings';

  const pairings = getAllPairings();
  const names = pairings.map(p => p.name);

  console.log('Available pairings:', names);
  // Output: ['agency', 'architect', ...]
  ```

  ```typescript Display Pairing Options theme={null}
  import { getAllPairings } from '@/lib/pairings';

  function PairingSelector() {
    const pairings = getAllPairings();
    
    return (
      <select>
        {pairings.map(pairing => (
          <option key={pairing.name} value={pairing.name}>
            {pairing.heading} + {pairing.body}
          </option>
        ))}
      </select>
    );
  }
  ```

  ```typescript Filter by Font Category theme={null}
  import { getAllPairings } from '@/lib/pairings';

  const allPairings = getAllPairings();
  const serifHeadings = allPairings.filter(
    p => p.headingCategory === 'serif'
  );

  console.log(`Pairings with serif headings: ${serifHeadings.length}`);
  ```

  ```typescript Get Google Fonts URLs theme={null}
  import { getAllPairings } from '@/lib/pairings';

  const pairings = getAllPairings();
  const googleFontsUrls = pairings.map(p => p.googleFontsUrl);

  // Preload all fonts
  googleFontsUrls.forEach(url => {
    const link = document.createElement('link');
    link.rel = 'stylesheet';
    link.href = url;
    document.head.appendChild(link);
  });
  ```
</CodeGroup>

## Example Response

```json theme={null}
[
  {
    "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

<Note>
  **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.
</Note>

<Note>
  **Data Source**: The pairings data is auto-generated from `registry/pairings/*.json` files. Do not edit `lib/pairings-data.ts` manually.
</Note>

<Tip>
  For filtered results, consider using specialized functions like [`getPairingsByMood`](/api/functions/get-pairings-by-mood) or [`getPairingsByCategory`](/api/functions/get-pairings-by-category) instead of filtering manually.
</Tip>
