Typography

Typography Variants

💡

You can always modify the existing typography variants or add new ones by editing the components/typography/variants.ts file.

Composing type

Use Text and Heading components to render titles and body copy. These components share size and weight props and map to the underlying type system to ensure consistent typography throughout your app.

<Heading mb="2" size="xl">Typographic principles</Heading>
<Text>The goal of typography is to relate font size, line height, and line width in a proportional way that maximizes beauty and makes reading easier and more pleasant.</Text>

Formatting

Compose formatting components to add emphasis, signal importance, present code and more.

<Text>
  The <Em>most</Em> important thing to remember is,{" "}
  <Strong>stay positive</Strong>.
</Text>

Type scale

The typographic system is based on a 9 step scale, every step has a corresponding font-size, line-height and letter-spacing value which are all designed to be used in combination.

SizeFont SizeLine Height
xs12px16px
sm14px20px
base16px24px
lg18px28px
xl20px32px
2xl24px36px
3xl30px40px
4xl36px48px
5xl48px56px
6xl64px72px
7xl72px80px
8xl96px104px
9xl128px136px

For more reference, see the Tailwind CSS Typography (opens in a new tab) documentation.

Font weight

The following weights are supported. see the Tailwind CSS Typography (opens in a new tab) documentation for more information.

WeightsProperty
thinfont-weight: 100
lightfont-weight: 300
normalfont-weight: 400
mediumfont-weight: 500
semiboldfont-weight: 600
boldfont-weight: 700
extraboldfont-weight: 800
blackfont-weight: 900