← All @molecule/* packages · App templates

@molecule/app-fonts-system

Provider bond · fonts · App (browser) · v1.0.1 · Apache-2.0

Native OS font stack — zero network requests, fastest load

npm install @molecule/app-fonts-system

npm · Source on GitHub · Implements @molecule/app-fonts

How it works

@molecule/app-fonts-system is a provider bond on the app (browser) side: it implements the fonts core interface (@molecule/app-fonts) with a concrete vendor or library behind it.

Your code calls the core; you wire this provider once at startup. Swapping vendors later is one line in that wiring, not a rewrite.

import { setFont } from '@molecule/app-fonts'
import { font } from '@molecule/app-fonts-system'

setFont(font) // once, at app startup

Works with: @molecule/app-fonts

Reference

Auto-generated, AI-first package reference for the molecule.dev ecosystem. It is written to be read by coding agents as much as by people, and is generated from this package's source — edit src/index.ts JSDoc, not this file.

System font bond for molecule.dev — the native OS font stack (system-ui with platform fallbacks). Zero font files, zero network requests, instant first paint. Exports a ready-made FontDefinition (font, role sans).

Quick Start

import { setFont } from '@molecule/app-fonts'
import { font } from '@molecule/app-fonts-system'

setFont(font) // once, at app startup

Type

provider

Installation

npm install @molecule/app-fonts-system @molecule/app-fonts

API

Constants

font

System font definition — native OS fonts, zero network requests.

const font: FontDefinition

Core Interface

Implements @molecule/app-fonts interface.

Injection Notes

Requirements

Peer dependencies:

  • @molecule/app-fonts ^1.0.1

Runtime Dependencies

  • @molecule/app-fonts

  • Nothing to serve or copy — there are no font files; setFont() only sets --mol-font-sans to the system stack.

  • Wire with setFont() from @molecule/app-fonts, never a raw bond('font', …) — the CSS variable is only set by setFont().

  • Fills the sans role only; serif/mono keep their own system defaults.