Typography
ARC UI ships no font files. It defines five typographic roles and names a reference face for each. To use your own face, override one token per role.
How roles work
Components assign a role to each piece of text and set its size, weight and tracking. You pick the face for each role and load its font files.
Each role has four tokens: the family you assign, the fallback stack, the weight, and the combined value that components read:
--font-body-family: 'Host Grotesk'; /* assign this */
--font-body-fallback: system-ui, sans-serif; /* rarely */
--font-body-weight: 500; /* if your face disagrees */
--font-body: var(--font-body-family), var(--font-body-fallback);
Override only -family. The fallback stays in place and every component using that role picks up the new face, so you never retype a font stack.
The weight is its own token because your face may not have the weight the role uses. Label is set at 600. Point it at a face whose heaviest cut is 500 and the browser fakes the bold, which looks smeared. Setting --font-label-weight to 500 fixes every component at once, because derived tokens like --section-title-weight and--ui-accent-weight read the role's weight instead of repeating the number.
The roles
--font-body-familyProse, inputs, descriptions, option lists, table cells. The default for everything not covered by another role.
--font-label-familyForm labels, table headers, eyebrows, dividers, segment labels. Set small, uppercase and tracked, so it needs a face that reads well at 12px in capitals.
--font-mono-familyCode blocks, keyboard hints, command palette shortcuts, and tabular numerics: meter readouts, stat deltas, calendar day numbers.
--font-display-familyLarge headings and hero type. Uses the Body face until you assign one. Its weight is set separately from Body's.
--font-quote-familyThe quotation glyph on arc-blockquote, the one place the system wants a serif.
--font-accent is an alias of the Label role, kept from before the roles were split out. The name sounds like a display face, but it has always set form labels and table headers. Use --font-label in new work.
Assigning a typeface
Set the family tokens on :root, after ARC UI's stylesheet. Custom properties inherit through the shadow boundary, so components pick them up.
@import '@arclux/arc-ui/base.css';
:root {
--font-body-family: 'Inter';
--font-label-family: 'Inter';
--font-mono-family: 'IBM Plex Mono';
--font-display-family: 'Fraunces'; /* opt into a display face */
}
Assigning one role leaves the others alone, except Display, which follows Body until you assign it. A role you don't assign keeps its reference face, or its fallback if that face isn't loaded.
Using one typeface everywhere
Point the roles at the same family. Size, weight and tracking are set separately for each role, so the hierarchy stays.
:root {
--font-body-family: 'Inter';
--font-label-family: 'Inter';
}
Scoping to part of a page
Role tokens are ordinary custom properties, so they cascade. Assign them on any ancestor to change the faces in that part of the page.
.marketing-section {
--font-display-family: 'Playfair Display';
}
Loading the font files
Assigning a role tells components which family to ask for. Loading the font is up to you: self-host it, use a font CDN, or use a package like Fontsource. A self-hosted@font-face looks like this:
@font-face {
font-family: 'Inter';
src: url('/fonts/inter-variable.woff2') format('woff2');
font-weight: 100 900; /* the font's real axis range, not one face per weight */
font-display: swap;
font-style: normal;
}
:root { --font-body-family: 'Inter'; }
Declare a variable font once, with a weight range. If you declare the same file several times with one weight each, the browser can't set thewght axis and renders the font's default instance for all of them. There's no error, and every weight ARC UI uses, from 200 to 700, renders the same.
Use the range the font has. A weight outside it gets the nearest end of the axis, so a face whose lightest cut is 300 can't give the Quote role its default 200. Set--font-quote-weight to a weight the face has.
Preload the faces used above the fold, and only those:
<link rel="preload" href="/fonts/inter-variable.woff2" as="font" type="font/woff2" crossorigin />
Use the family name the package registers
Whatever loads your font decides what the family is called, and the assignment has to use that exact string. An unknown family name isn't an error. The browser skips it, the role falls back, and the page renders in system-ui, which looks enough like a grotesque that you may not notice. Fontsource's variable packages, for example, register the family with a Variable suffix:
import '@fontsource-variable/host-grotesk'; // registers "Host Grotesk Variable"
:root {
--font-body-family: 'Host Grotesk'; /* ✗ silently unused */
--font-body-family: 'Host Grotesk Variable'; /* ✓ what the package registered */
}
The static Fontsource packages (@fontsource/host-grotesk) register the bare name. To check yours, read the font-family in the package's CSS, or open DevTools: the Computed panel shows the face that's rendering, and Rendered Fonts shows the file it came from. If it says system-ui, the name is wrong.
Fallbacks & layout shift
Each role has a fallback stack, used when its face isn't loaded. You can replace a fallback on its own:
:root { --font-body-fallback: Georgia, serif; }
A fallback has different widths and vertical metrics from your webfont, so text reflows when the real face arrives. To prevent that, declare a fallback adjusted to your font's metrics:
@font-face {
font-family: 'Inter Fallback';
src: local('Arial');
size-adjust: 107%; /* measured against Inter, not a general-purpose value */
ascent-override: 90%;
descent-override: 22%;
}
:root {
--font-body-family: 'Inter';
--font-body-fallback: 'Inter Fallback', system-ui, sans-serif;
}
Fontaine and next/font can generate these overrides for you. Withfont-display: swap and a matched fallback, the swap no longer shows as a jump.
The reference faces
The defaults name Host Grotesk, Tomorrow, JetBrains Mono and Georgia. The components were designed with them, and this site loads them for the specimens above, but ARC UI doesn't ship or load them. If you load nothing, each role renders in its fallback, and that's a supported setup.