Skip to content

Typography

The type scale as the components use it: a live specimen for each size with its line height, weight and class, and where the scale is ad hoc.

On this page

Fonts

One system font stack for text and one for code. Knowns UI sets neither on its own: it inherits your page font, and font-mono is Tailwind’s, so setting --font-sans and --font-mono in your theme restyles everything. The stacks below are what this site uses.

RoleStackSpecimen
Textui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serifAa Bb Cc 0123
Code (utility)ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospaceAa Bb Cc 0123
Code boxesui-monospace, "SF Mono", Menlo, Consolas, monospaceAa Bb Cc 0123

The scale

Components set sizes with arbitrary values such as text-[13px], not a named scale. These are the sizes used 10 or more times across the component files, in order. The weight and line height shown are the ones each size is most often paired with, and the specimen renders at exactly those values.

22 rows
SpecimenClass
10px / 10px · 600Agent finished in 4.2s15
10.5px / 16px · 500Agent finished in 4.2s17
11px / 16.5px · 500Agent finished in 4.2s185
11.5px / 18.69px · 500Agent finished in 4.2s200
12px / 15px · 500Agent finished in 4.2s407
12.5px / 17.19px · 500Agent finished in 4.2s518
13px / 20px · 500Agent finished in 4.2s683
13.5px / 21.94px · 500Agent finished in 4.2s218
14px / 22.75px · 500Agent finished in 4.2s281
14.5px / 22px · 600Agent finished in 4.2s11
15px / 24.38px · 600Agent finished in 4.2s192
16px / 26px · 600Agent finished in 4.2s96
17px / 27.63px · 600Agent finished in 4.2s28
19px / 23.75px · 600Agent finished in 4.2s15
20px / 28px · 600Agent finished in 4.2s17
22px / 27.5px · 600Agent finished in 4.2s28
24px / 32px · 600Agent finished in 4.2s11
26px / 26px · 600Agent finished in 4.2s10
28px / 28px · 600Agent finished in 4.2s14
32px / 40px · 600Agent finished in 4.2s14
40px / 40px · 600Agent finished in 4.2s10
48px / 49.92px · 600Agent finished in 4.2s10

Rare sizes

Sizes used fewer than 10 times. Most are a half pixel away from a step above.

ClassUsesUsually with
text-[9px]5leading-none font-semibold
text-[9.5px]1leading-relaxed font-medium
text-[15.5px]4leading-relaxed
text-[16.5px]1leading-[26px]
text-[18px]8leading-6 font-medium
text-[21px]2leading-snug font-medium
text-[23px]1leading-7 font-medium
text-[25px]1leading-[31px] font-semibold
text-[27px]1leading-[31px] font-semibold
text-[30px]6leading-9 font-semibold
text-[34px]2leading-none font-semibold
text-[36px]9leading-10 font-semibold
text-[38px]6leading-9 font-semibold
text-[42px]1leading-[1] font-medium
text-[44px]8leading-[1.08] font-semibold
text-[46px]1leading-[48px] font-semibold
text-[52px]1 -
text-[56px]9leading-[1.04] font-medium
text-[60px]6leading-[1.04] font-semibold
text-[64px]2leading-[1.04] font-semibold
text-[68px]3leading-relaxed font-medium
text-[72px]1 -
text-[76px]1 -
text-[84px]2leading-[1] font-medium
text-[88px]1 -
text-[90px]1leading-[48px] font-semibold
text-[96px]1 -
text-[112px]1leading-[1] font-medium
text-[124px]1 -
text-[186px]1leading-[0.8] font-semibold
text-[380px]1leading-[0.82] font-medium

Tailwind steps

A few components use Tailwind’s named sizes. Each one lands on a size the arbitrary values already cover.

ClassSize / line heightSame size asUses
text-xs12px / 16pxtext-[12px]44
text-sm14px / 20pxtext-[14px]42
text-base16px / 24pxtext-[16px]5
text-xl20px / 28pxtext-[20px]1
text-2xl24px / 32pxtext-[24px]1
text-5xl48px / 48pxtext-[48px]1

Weights

ClassWeightSpecimenUses
font-normal400Agent run complete61
font-medium500Agent run complete788
font-semibold600Agent run complete510
font-bold700Agent run complete3

Line height and tracking

Line height is set with Tailwind’s numeric and named classes, tracking mostly with tracking-tight and em values. These are the most used.

ClassUses
leading-relaxed139
leading-5117
leading-snug108
leading-none68
leading-tight65
leading-445
leading-642
leading-[18px]24
ClassUses
tracking-tight120
tracking-[-0.01em]51
tracking-wide40
tracking-[-0.02em]22
tracking-[-0.035em]12
tracking-[-0.03em]12
tracking-[0.06em]9
tracking-[-0.025em]6

Where it is ad hoc

Related: Color for the colour tokens and Theming for dark mode.

Need help?

Stuck on Typography, or found something off? We read every message.