fonts for Vite projects

Works with any Vite app — React, Vue, Svelte, Solid, vanilla. No plugin:

<!-- index.html -->
<head>
  <link rel="preconnect" href="https://cdn.onlyfonts.ai" crossorigin>
  <link href="https://cdn.onlyfonts.ai/css2?family=Inter:wght@400;600&display=swap" rel="stylesheet">
</head>
/* alternatively, from any CSS file */
@import url('https://cdn.onlyfonts.ai/css2?family=Inter:wght@400;600&display=swap');

Prefer the link tag over @import — it lets the browser start the font request earlier.

self-hosting

To bundle fonts with your build instead, download woff2 files from any font page into your project, declare @font-face rules, and let Vite fingerprint them like any asset. The fonts are open-source licensed — bundling is allowed.

picking the font

search the catalog by description or screenshot. Endpoint details: CDN reference.