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.
Size | Font Size | Line Height |
---|---|---|
xs | 12px | 16px |
sm | 14px | 20px |
base | 16px | 24px |
lg | 18px | 28px |
xl | 20px | 32px |
2xl | 24px | 36px |
3xl | 30px | 40px |
4xl | 36px | 48px |
5xl | 48px | 56px |
6xl | 64px | 72px |
7xl | 72px | 80px |
8xl | 96px | 104px |
9xl | 128px | 136px |
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.
Weights | Property |
---|---|
thin | font-weight: 100 |
light | font-weight: 300 |
normal | font-weight: 400 |
medium | font-weight: 500 |
semibold | font-weight: 600 |
bold | font-weight: 700 |
extrabold | font-weight: 800 |
black | font-weight: 900 |