Skip to content

Typography

Lexicon defines three font stacks, eleven size steps, four weights, four line heights, and five letter-spacing values. Semantic type presets combine these primitives into ready-to-use styles for headings, body, labels, and code.

Font families

TokenCSS variableStack
fontFamily.heading--font-heading'Satoshi Variable', -apple-system, BlinkMacSystemFont, sans-serif
fontFamily.body--font-body'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif
fontFamily.mono--font-mono'JetBrains Mono', 'SF Mono', 'Fira Code', monospace

Load Satoshi from Fontshare and DM Sans / JetBrains Mono from Google Fonts. See Installation for the exact link tags.

Font pairing specimen

Satoshi — The quick brown fox
Headings
DM Sans — The quick brown fox jumps over the lazy dog. Pack my box with five dozen liquor jugs.
Body
JetBrains Mono — const x = 42;
Code

Font sizes

TokenCSS variableValue
fontSize.xs--font-size-xs11px
fontSize.sm--font-size-sm13px
fontSize.base--font-size-base14px
fontSize.md--font-size-md16px
fontSize.lg--font-size-lg18px
fontSize.xl--font-size-xl20px
fontSize.2xl--font-size-2xl24px
fontSize.3xl--font-size-3xl28px
fontSize.4xl--font-size-4xl36px
fontSize.5xl--font-size-5xl48px
fontSize.6xl--font-size-6xl64px

Font weights

TokenCSS variableValue
fontWeight.regular--font-weight-regular400
fontWeight.medium--font-weight-medium500
fontWeight.semibold--font-weight-semibold600
fontWeight.bold--font-weight-bold700

Line heights

TokenCSS variableValue
lineHeight.tight--line-height-tight1.2
lineHeight.normal--line-height-normal1.5
lineHeight.relaxed--line-height-relaxed1.6
lineHeight.loose--line-height-loose1.8

Letter spacing

TokenCSS variableValue
letterSpacing.tight--letter-spacing-tight-0.025em
letterSpacing.normal--letter-spacing-normal0
letterSpacing.wide--letter-spacing-wide0.025em
letterSpacing.wider--letter-spacing-wider0.05em
letterSpacing.widest--letter-spacing-widest0.1em

Semantic type presets

These presets combine family, size, weight, line height, and letter spacing into named roles.

Headings (Satoshi)

PresetSizeWeightLine heightLetter spacing
heading.xl36 pxBold (700)1.2-0.025 em
heading.lg28 pxSemibold (600)1.2-0.025 em
heading.md20 pxMedium (500)1.5--
heading.sm18 pxMedium (500)1.5--

Body (DM Sans)

PresetSizeWeightLine height
body.lg16 pxRegular (400)1.6
body.md14 pxRegular (400)1.6
body.sm13 pxRegular (400)1.5

Labels (DM Sans)

PresetSizeWeightLine heightExtras
label.md13 pxMedium (500)1.5--
label.sm11 pxMedium (500)1.5uppercase, 0.05 em spacing

Code (JetBrains Mono)

PresetSizeWeightLine height
code.md13 pxRegular (400)1.6

Type scale specimen

Display
48px / 700
Heading XL
36px / 700
Heading Large
28px / 600
Heading Medium
20px / 500
Heading Small
18px / 500
Body Large — The quick brown fox jumps over the lazy dog.
16px / 400
Body — The quick brown fox jumps over the lazy dog.
14px / 400
Body Small — The quick brown fox jumps over the lazy dog.
13px / 400
Overline label
11px / 500 / upper
const token = 'code.md';
13px / mono

Usage

CSS

css
h1 {
  font-family: var(--font-heading);
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-tight);
}

p {
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  line-height: var(--line-height-relaxed);
}

Tailwind

html
<h1 class="font-heading text-4xl font-bold leading-tight tracking-tight">
  Page title
</h1>
<p class="font-body text-base leading-relaxed">
  Body text in DM Sans.
</p>

Released under the MIT License. A product by the pace.