Skip to content

Typography

Type tokens: three font families, a six-step type scale, four weights, and three line heights.

Font families

Each family is a system stack, so nothing is downloaded. Pick a family and weight and the full type scale re-renders below in place.

TokenStack
--hz-font-family-sanssystem-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif
--hz-font-family-serifui-serif, Georgia, Cambria, 'Times New Roman', Times, serif
--hz-font-family-monoui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace

--hz-font-family-sans: The default UI face. The reference theme sets it on the page, so every component inherits it. A system stack; no webfont ships.

sm · 0.875rem
The quick brown fox jumps over the lazy dog
base · 1rem
The quick brown fox jumps over the lazy dog
lg · 1.4rem
The quick brown fox jumps over the lazy dog
xl · 1.65rem
The quick brown fox jumps over the lazy dog
2xl · 2.75rem
The quick brown fox jumps over the lazy dog
3xl · 3.5rem
The quick brown fox jumps over the lazy dog

Font size scale

--hz-font-size-sm 0.875rem The quick brown fox
--hz-font-size-base 1rem The quick brown fox
--hz-font-size-lg 1.4rem The quick brown fox
--hz-font-size-xl 1.65rem The quick brown fox
--hz-font-size-2xl 2.75rem The quick brown fox
--hz-font-size-3xl 3.5rem The quick brown fox

Font weights

TokenValuePreview
--hz-font-weight-normal400Typography preview
--hz-font-weight-medium500Typography preview
--hz-font-weight-semibold600Typography preview
--hz-font-weight-bold700Typography preview

Line heights

TokenValuePreview
--hz-line-height-tight1.2

Wind pushed the drive wide on seventeen, but a smooth forehand upshot and a confident putt saved par from the rough.

--hz-line-height-base1.5

Wind pushed the drive wide on seventeen, but a smooth forehand upshot and a confident putt saved par from the rough.

--hz-line-height-loose1.75

Wind pushed the drive wide on seventeen, but a smooth forehand upshot and a confident putt saved par from the rough.

Using your own fonts

Every family, size, weight, and line height is a plain CSS custom property. Override one directly, or set typography in the hyzer config; see Theming → Tokens & Overrides.

Load a webfont, point the family token at it, and every component follows:

/* app.css, after the library sheets */
@import '@fontsource-variable/inter';

:root {
	--hz-font-family-sans: 'Inter Variable', system-ui, sans-serif;
}