Typography
Typefaces, the type scale and weights.
Typefaces
Aloxe uses Inter for text and Geist Mono for code. Both are set as CSS variables, with system fallbacks.
--aloxe-font-sans: "Inter", ui-sans-serif, system-ui, sans-serif;
--aloxe-font-mono: "Geist Mono", ui-monospace, Menlo, monospace;The package does not load the font files. Load them in your app, for example with next/font, and keep the same family names.
Type scale
Sizes are in pixels, shown as size / line height, followed by letter spacing where it is not zero. Display and heading styles are smaller on mobile.
| Style | Desktop (px, size / line) | Mobile, under 768px | Weight | CSS variable |
|---|---|---|---|---|
display | 56 / 60, -0.03em | 40 / 44, -0.02em | medium | --aloxe-display-size |
heading/1 | 36 / 44, -0.02em | 30 / 36, -0.02em | medium | --aloxe-heading-1-size |
heading/2 | 28 / 36, -0.01em | 24 / 32, -0.01em | medium | --aloxe-heading-2-size |
heading/3 | 22 / 28 | 20 / 28 | medium | --aloxe-heading-3-size |
heading/4 | 18 / 24 | 17 / 24 | medium | --aloxe-heading-4-size |
body/lg | 18 / 28 | 17 / 26 | regular | --aloxe-body-lg-size |
body/md | 16 / 24 | 16 / 24 | regular | --aloxe-body-md-size |
body/sm | 14 / 20 | 14 / 20 | regular | --aloxe-body-sm-size |
caption | 13 / 18 | 13 / 18 | regular | --aloxe-caption-size |
label/md | 14 / 20 | 14 / 20 | medium | --aloxe-label-md-size |
label/sm | 12 / 16 | 12 / 16 | medium | --aloxe-label-sm-size |
mono/md | 14 / 20 | 14 / 20 | regular | --aloxe-mono-md-size |
mono/sm | 12 / 16 | 12 / 16 | regular | --aloxe-mono-sm-size |
Weights
Only two weights are used: regular (400) and medium (500). Headings and labels are medium, body text is regular.
Using the scale
Each style has three variables: -size, -line-height and -tracking, for example --aloxe-heading-2-size. Pick the style by role, not by the size you want.