Fonts module for Nuxt
nuxt-fonts dependency to your projectWith pnpm
pnpm add nuxt-fonts
Or, with yarn
yarn add nuxt-fonts
Or, with npm
npm install nuxt-fonts
nuxt-fonts to the modules section of nuxt.config.tsexport default defineNuxtConfig({
modules: [
// Simple usage
"nuxt-fonts",
// With options
[
"nuxt-fonts",
{
/* module options */
},
],
],
});
export default defineNuxtConfig({
modules: ["nuxt-fonts"],
fonts: {
/* module options */
},
});
inlineBooleannuxt.options.ssrprovidergoogle|local|bunny'google'familiesArrayexport default {
fonts: {
families: [
name: string
as?: string
provider?: Providers
subsets?: string | string[]
display?: FontDisplay
normal?: number | number[] | string | string[]
italic?: number | number[] | string | string[]
fallbacks?: string[]
text?: string
]
}
}
fallbacksString[]['BlinkMacSystemFont', 'Segoe UI', 'Roboto', 'Helvetica Neue', 'Arial', 'Noto Sans']You can contribute to this module online with CodeSandBox:
Or locally:
pnpm installpnpm dev:preparepnpm buildpnpm devCopyright © Nuxt
We use cookies
We use cookies to analyze traffic and improve your experience. You can accept or reject analytics cookies.