Still UI

Choosing a font

Most font choices start with scrolling a list until something looks nice. For an interface, it works better the other way round: decide what the text has to do, rule out what can't do it, then test the few that are left in your own screens.

Start with the job

Interface text is mostly read at a glance: a button, a menu item, a label, a price. It has to be clear at small sizes, plain enough to disappear, and quick to recognise. Longer text, like docs and help pages, is read for minutes at a time, so anything quirky gets tiring by the second screen. Most products need both, which is why a calm sans serif is the usual answer: it does the glance job well and holds up for reading.

The lookalike test

Set a capital I, a lowercase l and the number 1 side by side, then O and 0. In many popular sans serifs they are the same shape. In running text, context rescues the reader. In a code, a key, a gate number or a password hint, there is no context, and a pause to work it out is a small failure. If your product shows codes, keys or IDs, treat this as a hard requirement.

Il1 O0 rn

Gate I or Gate 1? Your code is STILL-IL1O-0lI1.

KES 15,000 · 1,111 members

Capital I and lowercase l are the same plain stroke. In a code, you can't tell them apart.

What else to check

Look for open shapes: the gaps in letters like c, e and a should stay open, because closed gaps blur at small sizes. Look for a generous x-height, the height of the lowercase, but not so tall that a and d or n and h start to look alike. Keep the stroke contrast low; thick and thin strokes are lovely in headlines and tiring in a form.

Then check the family. It needs real regular, medium and semibold weights rather than ones the browser fakes, numbers that line up in tables, curly quotes and proper dashes, and the languages your users write in. A variable font with a weight axis covers the weights in one file and lets you fine-tune between them.

A pinch of personality

A detail that charms in a headline gets noisy when it repeats in every label. Aim for a font with a little character and no tics. Fonts also carry associations from where they are used most. A typeface that ships as the default of a popular framework makes your product look like that framework’s starter, however well it is made. That isn’t a flaw in the font, but it is worth knowing before you choose it.

One family is usually enough

Size, weight and color already give you all the hierarchy an interface needs, so a second display font rarely earns its place. Add a monospace for code, ideally from the same family so the two feel related. If you do pair two text faces, make them clearly different, like a serif with a sans. Two similar sans serifs only look like a mistake.

Test it in your own UI

Specimens flatter every font. Put your three or four finalists into a real screen: a heading, a row of buttons, a form field with a code in it, a paragraph of help text and a table of numbers. Look at each in light and dark mode. Light text on a dark background glows and looks heavier, so a font that is just right in light mode can feel bold in dark mode. Rule fonts out on what you see; the last one standing is usually obvious.

Using it with Still UI

The components take their fonts from two theme variables, so changing the font is two steps. Load it with next/font in your root layout, then point the theme at it, below the theme tokens in your global CSS.

app/layout.tsx
import { IBM_Plex_Mono, IBM_Plex_Sans } from "next/font/google";

const sans = IBM_Plex_Sans({ variable: "--font-plex-sans", subsets: ["latin"] });
// Fonts without a weight axis need the weights you use listed.
const mono = IBM_Plex_Mono({ variable: "--font-plex-mono", subsets: ["latin"], weight: ["400", "500", "600"] });

export default function RootLayout({ children }) {
  return (
    <html lang="en" className={`${sans.variable} ${mono.variable}`}>
      <body>{children}</body>
    </html>
  );
}
app/globals.css
@theme inline {
  --font-sans: var(--font-plex-sans), ui-sans-serif, system-ui, sans-serif;
  --font-mono: var(--font-plex-mono), ui-monospace, monospace;
}

What this site uses

IBM Plex Sans with IBM Plex Mono. We tested it against Geist, Figtree and Atkinson Hyperlegible Next in the site’s own screens. Geist and Figtree failed the lookalike test, which matters for our install keys. Atkinson passed it, but its slashed zero was too loud in prices and headlines. Plex passed everything, reads calmly, and comes with a matching mono.

Further reading

This guide draws on Jason Santa Maria’s On Web Typography, Erik Spiekermann’s Stop Stealing Sheep, Stephen Coles’s The Anatomy of Type, and the Choosing Type lessons in Google Fonts Knowledge.