fontless weekly downloads statistics
By made-in-common · npm · Vite plugins
Magical plug-and-play font optimization for modern web applications
fontless has 1,371,717 recorded weekly downloads on npm, an increase of 20.9% over the past 30 days, ranking #249 of 3,247 tracked listings.
About fontless
fontless
[![npm version][npm-version-src]][npm-version-href] [![npm downloads][npm-downloads-src]][npm-downloads-href] [![Github Actions][github-actions-src]][github-actions-href] [![Codecov][codecov-src]][codecov-href]
Magical plug-and-play font optimization for modern web applications
Features
- 🚀 Optimized font loading: Automatically loads and configures fonts with proper fallbacks and preload links.
- 🔤 Multiple provider support: Google Fonts, Bunny Fonts, FontShare, FontSource, and more using unifont
- 📦 Zero runtime overhead: Pure CSS solution with no JavaScript required at runtime
- 📏 Metric-based fallbacks: Reduces Cumulative Layout Shift (CLS) by using font metrics from fontaine
- 🔄 CSS transformation: Detects font-family usage in your CSS and injects optimized
@font-facedeclarations - 🎯 Framework agnostic: Works with all modern frameworks (Vue, React, Solid, Svelte, Qwik, etc.)
Installation
# npm
npm install fontless
# pnpm
pnpm install fontless
Usage
Add the fontless plugin to your Vite configuration:
// vite.config.js / vite.config.ts
import { defineConfig } from 'vite'
import { fontless } from 'fontless'
export default defineConfig({
plugins: [
// ... other plugins
fontless()
],
})
Using fonts in your CSS
Simply use fonts in your CSS as you normally would, and fontless will handle optimization:
/* Your CSS */
.google-font {
font-family: "Poppins", sans-serif;
}
.bunny-font {
font-family: "Aclonica", sans-serif;
}
Configuration
You can customize fontless with various options:
fontless({
// Configure available providers
providers: {
google: true, // Google Fonts
bunny: true, // Bunny Fonts
fontshare: true, // FontShare
fontsource: true, // FontSource
// Disable a provider
adobe: false
},
// Provider priority order
priority: ['google', 'bunny', 'fontshare'],
// Default font settings
defaults: {
preload: true, // also accepts { subsets: ['latin'], styles: ['normal'] } or a filter function
weights: [400, 700],
styles: ['normal', 'italic'],
// Fallbacks use category-aware presets from fontaine
// Override specific generic families as needed
fallbacks: {
'sans-serif': ['Arial', 'Helvetica Neue'],
// serif, monospace, cursive, fantasy, system-ui, etc. use shared defaults
}
},
// Custom font family configurations
families: [
// Configure a specific font
{
name: 'Poppins',
provider: 'google',
weights: [300, 400, 600]
},
// Ship only the glyphs this family needs
{
name: 'Cabinet Grotesk',
glyphs: 'Handgloves & 0123'
},
// Manual font configuration, with one entry per face
{
name: 'CustomFont',
src: [{ url: '/fonts/custom-font-regular.woff2', format: 'woff2' }],
weight: 400
},
{
name: 'CustomFont',
src: [{ url: '/fonts/custom-font-black.woff2', format: 'woff2' }],
weight: 900
}
],
// Asset configuration
assets: {
prefix: '/assets/_fonts'
},
// Where font metadata, downloaded fonts and subsetted local fonts are cached between
// builds, defaulting to `node_modules/.cache/fontless/meta`. Accepts a directory (resolved from the Vite
// root), `{ dir }`, a storage instance such as `unstorage` for a custom driver, or `false` to
// disable persistent caching.
cache: '.cache/fonts',
// Experimental features
experimental: {
disableLocalFallbacks: false
}
})
Entries in families that share a name configure one family. Every entry with src contributes its own @font-face. Family-level options such as preload, fallbacks, and glyphs are taken from the first entry that sets them, and the family is global if any entry sets global. If a family has both src entries and provider entries, only the src entries are used.
Category-Aware Fallbacks
Fontless uses category-aware fallback presets shared with the fontaine package. These presets provide optimized system fonts for different generic font families:
- sans-serif:
Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans - serif:
Times New Roman,Georgia,Noto Serif,Liberation Serif - monospace:
Courier New,Roboto Mono,Noto Sans Mono,Liberation Mono - cursive: Uses handwriting category fallbacks
- fantasy: Uses display category fallbacks
- system-ui, ui-serif, ui-sans-serif, ui-monospace: Mapped to corresponding category presets
You can override fallbacks for specific generic families in the defaults.fallbacks configuration while keeping the shared defaults for others. This ensures consistent font fallback behavior across your application and reduces cumulative layout shift (CLS).
Variable Font Fallbacks
A face that declares a font-weight range gains a second fallback face per fallback font, matched by font-weight: 700. It uses the bold face of the fallback font and is sized to the bold weight of your font, so bold text does not reflow when the web font loads.
Set fallbackInstances on a family (or on defaults, for every family) to choose which weights and widths get a fallback face of their own:
fontless({
families: [
{
name: 'Archivo',
src: '/fonts/archivo.woff2',
weight: [100, 900],
stretch: '62% 125%',
fallbackInstances: [{ weight: 700 }, { weight: 800 }, { weight: 700, stretch: '125%' }],
},
],
})
```…
Description from the npm listing.
- font
- optimization
- vite-plugin
- css
- javascript
README badge
Show your rank in a README or on your website. The badge updates automatically.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Ranking history
Listing placement
Listing placement
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Recent observations
Full history (170)Similar npm Vite plugins plugins
All 20 fontless alternativesData source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/fontless. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.