@pikacss/plugin-fonts
v0.0.69
Published
Web fonts plugin for PikaCSS. Resolves Google, Bunny, and Fontshare through `unifont` into build-time `@font-face` rules, supports legacy/custom stylesheet providers, and creates CSS variables and shortcuts.
Readme
@pikacss/plugin-fonts
Web fonts plugin for PikaCSS. Resolves Google, Bunny, and Fontshare through unifont into build-time @font-face rules, supports legacy/custom stylesheet providers, and creates CSS variables and shortcuts.
Installation
pnpm add -D @pikacss/plugin-fontsUsage
The example below assumes the application already uses @pikacss/unplugin-pikacss; Nuxt applications can import the same defineConfig surface from @pikacss/nuxt-pikacss.
import { fonts } from '@pikacss/plugin-fonts'
import { defineConfig } from '@pikacss/unplugin-pikacss'
export default defineConfig({
engine: {
plugins: [fonts()],
fonts: {
provider: 'google',
fonts: {
sans: 'Inter:400,500,600,700',
},
},
},
})Documentation
See the full documentation.
License
MIT
