Text
Size, weight, alignment and wrapping. Size and alignment have screen-size versions: text-2xl md:text-4xl, text-center md:text-start. There are no letter-spacing classes on purpose: Familjen Grotesk is drawn to be read at its normal spacing.
Sizes
text-xs · 12px
text-sm · 14px
text-base · 16px
text-lg · 18px
text-xl · 20px
text-2xl · 24px
text-4xl · 36px
<p class="text-xs">text-xs · 12px</p>
<p class="text-sm">text-sm · 14px</p>
<p class="text-base">text-base · 16px</p>
<p class="text-lg">text-lg · 18px</p>
<p class="text-xl">text-xl · 20px</p>
<p class="text-2xl font-semibold">text-2xl · 24px</p>
<p class="text-4xl font-bold leading-tight">text-4xl · 36px</p>Cutting text short
truncate keeps one line and ends with "…"; line-clamp-2 keeps two. Give long words a way to break with break-words.
Quarterly planning notes for the website redesign and the new pricing page
Quarterly planning notes for the website redesign, the new pricing page, the onboarding emails and the help center.
https://momo.example/projects/website-redesign/files/brand-assets
<div class="max-w-xs space-y-3">
<p class="truncate box p-2">Quarterly planning notes for the website redesign and the new pricing page</p>
<p class="line-clamp-2 box p-2">Quarterly planning notes for the website redesign, the new pricing page, the onboarding emails and the help center.</p>
<p class="break-words box p-2">https://momo.example/projects/website-redesign/files/brand-assets</p>
</div>Headlines that wrap nicely
text-balance evens out the lines of a heading; text-pretty avoids a single word on the last line of a paragraph.
Everything your team needs to plan, track and ship work
<h3 class="text-balance max-w-md">Everything your team needs to plan, track and ship work</h3>Size, weight, alignment, wrapping
| Class | CSS |
|---|---|
text-xs | font-size: .75rem; line-height: 1.5; |
text-sm | font-size: .875rem; line-height: 1.5; |
text-base | font-size: 1rem; line-height: 1.55; |
text-lg | font-size: 1.125rem; line-height: 1.5; |
text-xl | font-size: 1.25rem; line-height: 1.4; |
text-2xl | font-size: 1.5rem; line-height: 1.3; |
text-3xl | font-size: 1.875rem; line-height: 1.2; |
text-4xl | font-size: 2.25rem; line-height: 1.15; |
text-5xl | font-size: 3rem; line-height: 1.1; |
text-6xl | font-size: 3.75rem; line-height: 1.05; |
font-normal | font-weight: 400; |
font-medium | font-weight: 500; |
font-semibold | font-weight: 600; |
font-bold | font-weight: 700; |
text-start | text-align: start; |
text-center | text-align: center; |
text-end | text-align: end; |
text-justify | text-align: justify; |
leading-none | line-height: 1; |
leading-tight | line-height: 1.25; |
leading-snug | line-height: 1.375; |
leading-normal | line-height: 1.55; |
leading-relaxed | line-height: 1.7; |
leading-loose | line-height: 2; |
text-wrap | text-wrap: wrap; |
text-nowrap | text-wrap: nowrap; |
text-balance | text-wrap: balance; |
text-pretty | text-wrap: pretty; |
line-clamp-1 | display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 1; line-clamp: 1; |
line-clamp-2 | display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; |
line-clamp-3 | display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; |
line-clamp-4 | display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 4; line-clamp: 4; |
line-clamp-5 | display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 5; line-clamp: 5; |
line-clamp-6 | display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 6; line-clamp: 6; |
line-clamp-none | display: block; overflow: visible; -webkit-line-clamp: unset; line-clamp: none; |
More
These don't change with the screen. Colors: text-<color> (on the Colors page), text-muted, text-ink. Case: uppercase, lowercase, capitalize, normal-case (on Typography).
| Class | CSS |
|---|---|
font-sans | font-family: var(--momo-font); |
font-mono | font-family: var(--momo-font-mono); |
italic | font-style: italic; |
not-italic | font-style: normal; |
line-through | text-decoration-line: line-through; |
no-underline | text-decoration-line: none; |
tabular-nums | font-variant-numeric: tabular-nums; |
normal-nums | font-variant-numeric: normal; |
break-words | overflow-wrap: anywhere; |
break-all | word-break: break-all; |
break-normal | overflow-wrap: normal; word-break: normal; |
truncate | overflow: hidden; text-overflow: ellipsis; white-space: nowrap; |
whitespace-nowrap | white-space: nowrap; |
whitespace-pre-line | white-space: pre-line; |
align-baseline | vertical-align: baseline; |
align-top | vertical-align: top; |
align-middle | vertical-align: middle; |
align-bottom | vertical-align: bottom; |
align-text-top | vertical-align: text-top; |
align-text-bottom | vertical-align: text-bottom; |
text-inherit | color: inherit; |
underline | text-decoration-line: underline; |
underline-offset-1 | text-underline-offset: 1px; |
underline-offset-2 | text-underline-offset: 2px; |
underline-offset-4 | text-underline-offset: 4px; |
underline-offset-8 | text-underline-offset: 8px; |
decoration-1 | text-decoration-thickness: 1px; |
decoration-2 | text-decoration-thickness: 2px; |
decoration-3 | text-decoration-thickness: 3px; |
decoration-4 | text-decoration-thickness: 4px; |
decoration-solid | text-decoration-style: solid; |
decoration-wavy | text-decoration-style: wavy; |
decoration-dotted | text-decoration-style: dotted; |
decoration-dashed | text-decoration-style: dashed; |
hyphens-auto | hyphens: auto; |
hyphens-none | hyphens: none; |
indent-0 | text-indent: 0; |
indent-4 | text-indent: 1rem; |
indent-8 | text-indent: 2rem; |
list-none | list-style-type: none; padding-inline-start: 0; |
list-disc | list-style-type: disc; |
list-decimal | list-style-type: decimal; |
list-inside | list-style-position: inside; |
columns-2 | columns: 2; column-gap: 1.5rem; |
columns-3 | columns: 3; column-gap: 1.5rem; |
columns-4 | columns: 4; column-gap: 1.5rem; |
break-inside-avoid | break-inside: avoid; |