Skip to main content

Typography token reference

Every typography token, with its CSS custom property and its resolved value in all three densities.

Version: EDS 2.0 (beta)

Use this page to check a name or a value. If you are choosing a role or a step rather than looking one up, start with Using typography.

Generated page

These tables are generated from the token source. If a value here disagrees with what you see in Figma or in the browser, the page is stale, so please say so rather than working around it.

51 tokens. 46 size and line-height tokens, which have one value per density, and 5 family and weight tokens, which have one value everywhere. The Token column is the name you pick in Figma and the CSS custom property column is the same token in code. Both come from the token definition itself, so they cannot drift apart. The Comfortable column is what you get with no data-density attribute set.

8 steps, xs to 4xl, set in Equinor. Values in px.

TokenCSS custom propertyCompactComfortableRelaxed
typography.header.xs.font-size--eds-typography-header-xs-font-size101214
typography.header.xs.line-height--eds-typography-header-xs-line-height121620
typography.header.sm.font-size--eds-typography-header-sm-font-size121416
typography.header.sm.line-height--eds-typography-header-sm-line-height162020
typography.header.md.font-size--eds-typography-header-md-font-size141618
typography.header.md.line-height--eds-typography-header-md-line-height202024
typography.header.lg.font-size--eds-typography-header-lg-font-size161821
typography.header.lg.line-height--eds-typography-header-lg-line-height202428
typography.header.xl.font-size--eds-typography-header-xl-font-size182124
typography.header.xl.line-height--eds-typography-header-xl-line-height242832
typography.header.2xl.font-size--eds-typography-header-2xl-font-size212428
typography.header.2xl.line-height--eds-typography-header-2xl-line-height283236
typography.header.3xl.font-size--eds-typography-header-3xl-font-size242832
typography.header.3xl.line-height--eds-typography-header-3xl-line-height323640
typography.header.4xl.font-size--eds-typography-header-4xl-font-size283236
typography.header.4xl.line-height--eds-typography-header-4xl-line-height364044

Label​

9 steps, xs to 5xl, set in Inter. Values in px.

TokenCSS custom propertyCompactComfortableRelaxed
typography.label.xs.font-size--eds-typography-label-xs-font-size91012
typography.label.xs.line-height--eds-typography-label-xs-line-height121616
typography.label.sm.font-size--eds-typography-label-sm-font-size101214
typography.label.sm.line-height--eds-typography-label-sm-line-height121620
typography.label.md.font-size--eds-typography-label-md-font-size121416
typography.label.md.line-height--eds-typography-label-md-line-height162024
typography.label.lg.font-size--eds-typography-label-lg-font-size141618
typography.label.lg.line-height--eds-typography-label-lg-line-height202424
typography.label.xl.font-size--eds-typography-label-xl-font-size161821
typography.label.xl.line-height--eds-typography-label-xl-line-height242428
typography.label.2xl.font-size--eds-typography-label-2xl-font-size182124
typography.label.2xl.line-height--eds-typography-label-2xl-line-height242832
typography.label.3xl.font-size--eds-typography-label-3xl-font-size212428
typography.label.3xl.line-height--eds-typography-label-3xl-line-height283232
typography.label.4xl.font-size--eds-typography-label-4xl-font-size242832
typography.label.4xl.line-height--eds-typography-label-4xl-line-height323236
typography.label.5xl.font-size--eds-typography-label-5xl-font-size283237
typography.label.5xl.line-height--eds-typography-label-5xl-line-height323640

Body​

6 steps, sm to 3xl, set in Inter. Values in px.

TokenCSS custom propertyCompactComfortableRelaxed
typography.body.sm.font-size--eds-typography-body-sm-font-size101214
typography.body.sm.line-height--eds-typography-body-sm-line-height162024
typography.body.md.font-size--eds-typography-body-md-font-size121416
typography.body.md.line-height--eds-typography-body-md-line-height202428
typography.body.lg.font-size--eds-typography-body-lg-font-size141618
typography.body.lg.line-height--eds-typography-body-lg-line-height242828
typography.body.xl.font-size--eds-typography-body-xl-font-size161821
typography.body.xl.line-height--eds-typography-body-xl-line-height282832
typography.body.2xl.font-size--eds-typography-body-2xl-font-size182124
typography.body.2xl.line-height--eds-typography-body-2xl-line-height283236
typography.body.3xl.font-size--eds-typography-body-3xl-font-size212428
typography.body.3xl.line-height--eds-typography-body-3xl-line-height323644

Family and weight​

These do not change with density.

TokenCSS custom propertyValue
font-family.header--eds-font-family-headerEquinor
font-family.ui--eds-font-family-uiInter
font-weight.normal--eds-font-weight-normal400
font-weight.medium--eds-font-weight-medium500
font-weight.bold--eds-font-weight-bold700

In TypeScript​

The tokens also ship as TypeScript objects, for the places a CSS custom property cannot reach. A name segment that starts with a digit becomes a word, and a hyphenated segment is camel-cased, so typography.header.2xl.line-height is typography.header.twoXl.lineHeight.

import { semantic } from '@equinor/eds-tokens/next/ts/semantic/light'

semantic.typography.label.md.fontSize // 14
semantic.typography.header.twoXl.lineHeight // 32
semantic.fontWeight.medium // 500

The next/ paths are temporary for the beta line. Two differences from the CSS form, both easy to miss:

  • The values are unitless numbers, not lengths. 14, not 14px. Add the unit yourself.
  • semantic is frozen at Comfortable. There is no attribute for an object to read, so the densities are separate modules and you pick one:
import { density } from '@equinor/eds-tokens/next/ts/density/compact'

density.typography.label.md.fontSize // 12

The family and weight tokens are only in semantic, because they do not change with density.