Typography tokens

Typography is used to create a consistent hierarchy, readability, and visual language across the design system. The system uses a set of tokens for font size, line height, and font weight.

Tokens

Every token is prefixed with --dds-, use the variants concated with the base name to get the token value. Example: --dds-font-lg or --dds-font-line-height-large. For predefined typography building blocks, you can use the dap-ds-typography component also.

Font size

Font size is used to define the size of the text. It is the height of the text block.

TokenValueExample--dds-font-xs0.75rem
xs
--dds-font-sm0.875rem
sm
--dds-font-base1rem
base
--dds-font-lg1.125rem
lg
--dds-font-xl1.25rem
xl
--dds-font-2xl1.375rem
2xl
--dds-font-3xl1.5rem
3xl
--dds-font-4xl1.75rem
4xl
--dds-font-5xl2rem
5xl
--dds-font-6xl2.25rem
6xl
--dds-font-7xl2.5rem
7xl
--dds-font-8xl2.875rem
8xl
--dds-font-9xl3.25rem
9xl
--dds-font-10xl3.625rem
10xl
--dds-font-11xl4.125rem
11xl
--dds-font-12xl4.625rem
12xl
Line height

Line height is used to define the height of the line. It is the distance between the baselines of two lines of text.

TokenValueExample--dds-font-line-height-base1
base
--dds-font-line-height-large1.25
large
--dds-font-line-height-xlarge1.5
xlarge
Font weight

Font weight is used to define the thickness of the text. It is the darkness of the text.

TokenValueExample--dds-font-weight-medium500
medium
--dds-font-weight-bold700
bold