Typography

Plex UI typography system. Text scales, semantic color tokens, font weights, and line-height presets for consistent reading hierarchy

Typeface

Every text of the kit, on the desktop and on a phone, is set in Inter 4, as in the Plex UI Figma kit. @plexui/styles ships it: its variable files with the optical-size axis, so text up to 14px takes Inter's text cut, text from 32px its display cut and the sizes between a blend of the two, and any weight from 100 to 900 (the phone's 510 and 590 included). The files are split by script, so a page downloads only the scripts it shows.

Tracking follows the size as the Plex UI Figma kit sets Inter (its Android & Web typography mode). Plex UI sets it on every element through --font-sans-tracking, so each text tracks at its own size: 0 up to 12px, -0.05px at 13px, -0.10px at 14 and 15px, -0.15px at 16 and 17px, -0.10px at 18px, -0.15px from 20 to 24px, -0.20px from 28 to 48px, -0.30px at 60px and -0.36px at 72px; a size between takes the value between.

Code, ids and other monospace text are set in Geist Mono, the code face of the Figma kit, shipped by @plexui/styles the same way (variable files, any weight, split by script) as --font-mono. It keeps its own spacing: no tracking is set on it.

Change the typeface of the whole kit in one place, after the Plex UI stylesheet:

:root {
  --font-sans: "Geist", ui-sans-serif, system-ui, sans-serif;
  /* Inter's tracking does not suit another face: use what it asks, normal for one that tracks itself. */
  --font-sans-tracking: normal;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

React and Vue, every component and every Tailwind font-sans and font-mono utility read these. Load the new face yourself (with @font-face, next/font or a font service); a shipped face you replace stays unused and is not downloaded.

Scales

Scales include sizing for heading and text sizes, with combinations of font-size,font-weight, and line-height.

NameSizeWeightTrackingLine
heading-5xl72px600-0.36px72px
heading-4xl60px600-0.30px60px
heading-3xl48px600-0.20px48px
heading-2xl36px600-0.20px42px
heading-xl32px600-0.20px38px
heading-lg24px600-0.15px28px
heading-md20px600-0.15px26px
heading-sm18px600-0.10px26px
heading-xs16px600-0.15px24px
text-lg18px400-0.10px29px
text-md16px400-0.15px24px
text-sm14px400-0.10px20px
text-xs12px4000px18px
text-2xs10px4000px14px
text-3xs8px4000px12px

All text sizes are exposed to Tailwind, with custom utilities for heading-* and text-* classes. The text-md scale is the text-base utility (Tailwind has no text-md class).

Example usage:

<h5 className="text-secondary mb-1">Get started</h5>
<h2 className="heading-xl mb-3">Building your first app</h2>
<p className="text-base">
  Start from a template, add your first screen and preview it on your phone in
  a few minutes. You can change any of it later.
</p>

The underlying CSS variables can be referenced directly in CSS, as needed.

/* Headings */
--font-heading-xl-size: 2rem; /* 32px  */
--font-heading-xl-line-height: 2.375rem; /* 38px */
--font-heading-xl-weight: var(--font-weight-semibold);
/* Text */
--font-text-md-size: 1rem; /* 16px  */
--font-text-md-line-height: 1.5rem; /* 24px */
--font-text-md-weight: var(--font-weight-normal);

Colors

Four semantic text colors are provided by default: default, secondary, tertiary, and inverse (for text on solid, inverted backgrounds).

<p className="text-default">text-default</p>
<p className="text-secondary">text-secondary</p>
<p className="text-tertiary">text-tertiary</p>
<p className="text-inverse">text-inverse</p>

For more details on using semantic color variables directly, explore our design tokens.

Weights

The available weights are fairly standard. Semibold is the most common bolded value.

<p className="font-normal">font-normal</p>
<p className="font-medium">font-medium</p>
<p className="font-semibold">font-semibold</p>
<p className="font-bold">font-bold</p>

CSS variables are exposed in the common Tailwind pattern of font-weight-*:

--font-weight-normal: 400;
--font-weight-medium: 500;
--font-weight-semibold: 600;
--font-weight-bold: 700;

Line height

Line heights are optimized for readability and tailored to how each font-size sits on the baseline.

Values are designed to create optimal centering with align-items: center for that given font-size, which ultimately means aligning to an odd or even pixel value.

Each scale uses a corresponding CSS variable (e.g. --font-heading-xl-line-height, --font-text-md-line-height). Use these variables in custom CSS or rely on the Tailwind heading-* and text-* utilities, which already apply the correct line height.