Browse documentation
Reference / Typography
Font size
Use the type scale for headings and body copy. Named size tokens include a matching line height.
Working example
Architecture · Field report
The courtyard
A quiet space between two buildings.
Use a slash to set a different line height together with the font size. The 6 in text-lg/6 resolves to 1.5rem on the default spacing scale.
<div>
<p class="text-xs">Architecture · Field report</p>
<h3 class="text-4xl">The courtyard</h3>
<p class="text-lg/6">A quiet space between two buildings.</p>
</div>Class reference
| Class | CSS declarations |
|---|---|
text-xs | font-size: .75rem;
line-height: 1rem; |
text-base | font-size: 1rem;
line-height: 1.5rem; |
text-2xl | font-size: 1.5rem;
line-height: 2rem; |
text-4xl | font-size: 2.25rem;
line-height: 2.5rem; |
text-lg/6 | font-size: 1.125rem;
line-height: 1.5rem; |
text-[1.375rem] | font-size: 1.375rem; |
View full generated CSS
.text-2xl {
font-size: 1.5rem;
line-height: 2rem;
}
.text-4xl {
font-size: 2.25rem;
line-height: 2.5rem;
}
.text-\[1\.375rem\] {
font-size: 1.375rem;
}
.text-base {
font-size: 1rem;
line-height: 1.5rem;
}
.text-lg\/6 {
font-size: 1.125rem;
line-height: 1.5rem;
}
.text-xs {
font-size: .75rem;
line-height: 1rem;
}