Typography & fonts
A fluid type scale, self-hosted open-licence fonts, one-attribute font pairings, long-form prose styling and text utilities. All of it is tokens, so a theme or a single attribute changes it everywhere.
Fonts
@prismora/fonts ships 12 variable fonts under the SIL Open Font License, served from your own site (no third-party requests). Each file uses unicode-range, so a page downloads only the character subsets it shows. Without any font import, every pairing falls back to the device's system fonts.
Pairings
A pairing sets four families at once: --pm-font-sans (UI), --pm-font-display (headings), --pm-font-serif and --pm-font-mono, plus --pm-font-body for long-form reading text. Apply it with data-font on any element (the whole page, one section or one card), set typography.font in your theme, or let people pick one: ThemeController.set({ font }) saves it and restores it before first paint. Try Font in the display settings (gear icon, top right).
System: Quick brown fox
The device's own UI fonts. Nothing to download. The five boxing wizards jump quickly — 0123456789.
const total = items.reduce(sum, 0);Inter: Quick brown fox
Neutral, highly legible UI sans (default). The five boxing wizards jump quickly — 0123456789.
const total = items.reduce(sum, 0);Figtree: Quick brown fox
Friendly geometric sans with clean numerals. The five boxing wizards jump quickly — 0123456789.
const total = items.reduce(sum, 0);Plus Jakarta: Quick brown fox
Modern product sans with a distinctive display. The five boxing wizards jump quickly — 0123456789.
const total = items.reduce(sum, 0);Manrope: Quick brown fox
Semi-condensed, technical and compact. The five boxing wizards jump quickly — 0123456789.
const total = items.reduce(sum, 0);Grotesk: Quick brown fox
Space Grotesk headings over DM Sans text. The five boxing wizards jump quickly — 0123456789.
const total = items.reduce(sum, 0);Friendly: Quick brown fox
Rounded Nunito for consumer and education apps. The five boxing wizards jump quickly — 0123456789.
const total = items.reduce(sum, 0);Editorial: Quick brown fox
Serif reading text with Fraunces headings and Inter UI. The five boxing wizards jump quickly — 0123456789.
const total = items.reduce(sum, 0);Type scale
Nine steps from a modular ratio (typography.scale, default 1.2). Sizes are fluid: the larger steps shrink smoothly on small screens, so headings never overflow a phone. Everything is in rem, so the user's browser text size and the Text size display setting (data-text-size="sm|lg|xl") scale type, spacing and controls together.
--pm-font-size-5xlAa Prismora--pm-font-size-4xlAa Prismora--pm-font-size-3xlAa Prismora--pm-font-size-2xlAa Prismora--pm-font-size-xlAa Prismora--pm-font-size-lgAa Prismora--pm-font-size-mdAa Prismora--pm-font-size-smAa Prismora--pm-font-size-xsAa PrismoraProse
Put class="pm-prose" on Markdown or CMS output. It styles headings, paragraphs, lists, quotes, code, tables, figures and more with a readable line length, using the pairing's body font (serif for editorial). data-size="sm|lg" and data-measure="narrow|wide|none" adjust it.
Designing with one seed
Every colour, surface and font in a Prismora theme flows from a handful of decisions.
Good typography is mostly rhythm: consistent line height, a comfortable line length and clear contrast between levels. Inline code, Ctrl + K and highlights keep their own voice.
Type is a beautiful group of letters, not a group of beautiful letters.
What you get
- Fluid sizes that adapt to the screen
- Variable fonts with every weight in one file
- Pairings you can switch per page or per section
import '@prismora/fonts/pairing-editorial.css'; | Token | Value |
|---|---|
| --pm-measure-normal | 65ch |
| --pm-line-height-relaxed | 1.65 |
Utilities
| Class | Does |
|---|---|
.pm-font-sans | serif | display | mono | body | Family by role |
.pm-text-xs … .pm-text-5xl | Size from the scale |
.pm-display, .pm-heading, .pm-lead, .pm-eyebrow, .pm-caption | Text styles by look, independent of h1–h6 |
.pm-weight-regular | medium | semibold | bold, .pm-italic | Weight and style |
.pm-leading-tight | snug | normal | relaxed, .pm-tracking-tight | wide, .pm-uppercase | Line height and letter spacing |
.pm-text-start | center | end, .pm-text-accent | success | warning | danger, .pm-muted | Alignment and colour |
.pm-truncate, .pm-line-clamp (--pm-lines), .pm-balance, .pm-pretty, .pm-nowrap, .pm-measure | Wrapping and overflow |
.pm-tabular, .pm-slashed-zero | Number styles for tables and figures |
Tokens: --pm-font-*, --pm-font-size-*, --pm-font-weight-*, --pm-line-height-*, --pm-tracking-*, --pm-measure-*. CSS-only projects can import just @prismora/css/typography.css.