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

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.

HTML
<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

ClassCSS declarations
text-xsfont-size: .75rem; line-height: 1rem;
text-basefont-size: 1rem; line-height: 1.5rem;
text-2xlfont-size: 1.5rem; line-height: 2rem;
text-4xlfont-size: 2.25rem; line-height: 2.5rem;
text-lg/6font-size: 1.125rem; line-height: 1.5rem;
text-[1.375rem]font-size: 1.375rem;
View full generated CSS
Compiled 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;
}