Utilities
Typography
Font family, size, weight, line height, letter spacing, alignment, decoration, wrapping and lists.
Live example
<div class="space-y-2">
<p class="text-4xl font-black tracking-tight">Monsoon</p>
<p class="text-xl font-semibold text-balance">Text that balances its lines so headings never leave one word alone</p>
<p class="text-sm text-muted-foreground leading-relaxed line-clamp-2 max-w-md">Line clamp keeps long descriptions to two lines. Everything after the second line is hidden behind an ellipsis, which is handy for cards and lists that need equal heights.</p>
<p class="font-mono text-sm uppercase tracking-widest text-primary">font-mono uppercase tracking-widest</p>
</div>Variant support
Variants are generated where they are useful, which keeps the whole stylesheet small enough to link from a CDN. Prefix a class with one of these to apply it in that state or above that width, for example md:text-xs. Stacked variants such as dark:hover: are not part of the prebuilt file; arbitrary values take any variant, stacked, with the optional script or the purge CLI.
| Kind | Prefixes | Classes in this category |
|---|---|---|
| State | hover:active: | 2 |
| Group and peer | group-hover:peer-checked: | 2 |
| Structure | not generated | 0 |
| Motion | not generated | 0 |
| Scheme | not generated | 0 |
| Breakpoints | sm:md:lg:xl:2xl: | 28 |
| Containers | @xs:@sm:@md:@lg:@xl: | 16 |
| Media and direction | print:screen:rtl:ltr:forced-colors: | 28 |
Font family 3
Variants: none
| Class | CSS |
|---|---|
font-sans | font-family: var(--font-sans); |
font-serif | font-family: var(--font-serif); |
font-mono | font-family: var(--font-mono); |
Font size 22
Variants: listed per class
| Class | CSS | Variants |
|---|---|---|
text-xs | font-size: 0.75rem; line-height: 1rem; | sm md lg xl 2xl @xs @sm @md @lg @xl print screen |
text-sm | font-size: 0.875rem; line-height: 1.25rem; | sm md lg xl 2xl @xs @sm @md @lg @xl print screen |
text-base | font-size: 1rem; line-height: 1.5rem; | sm md lg xl 2xl @xs @sm @md @lg @xl print screen |
text-lg | font-size: 1.125rem; line-height: 1.75rem; | sm md lg xl 2xl @xs @sm @md @lg @xl print screen |
text-xl | font-size: 1.25rem; line-height: 1.75rem; | sm md lg xl 2xl @xs @sm @md @lg @xl print screen |
text-2xl | font-size: 1.5rem; line-height: 2rem; | sm md lg xl 2xl @xs @sm @md @lg @xl print screen |
text-3xl | font-size: 1.875rem; line-height: 2.25rem; | sm md lg xl 2xl @xs @sm @md @lg @xl print screen |
text-4xl | font-size: 2.25rem; line-height: 2.5rem; | sm md lg xl 2xl @xs @sm @md @lg @xl print screen |
text-5xl | font-size: 3rem; line-height: 1; | sm md lg xl 2xl @xs @sm @md @lg @xl print screen |
text-6xl | font-size: 3.75rem; line-height: 1; | sm md lg xl 2xl @xs @sm @md @lg @xl print screen |
text-7xl | font-size: 4.5rem; line-height: 1; | sm md lg xl 2xl @xs @sm @md @lg @xl print screen |
text-8xl | font-size: 6rem; line-height: 1; | sm md lg xl 2xl @xs @sm @md @lg @xl print screen |
text-9xl | font-size: 8rem; line-height: 1; | sm md lg xl 2xl @xs @sm @md @lg @xl print screen |
text-fluid-sm | font-size: clamp(0.8125rem, 0.788rem + 0.1087vw, 0.875rem); line-height: 1.5; | |
text-fluid-base | font-size: clamp(0.9375rem, 0.913rem + 0.1087vw, 1rem); line-height: 1.6; | |
text-fluid-lg | font-size: clamp(1rem, 0.9511rem + 0.2174vw, 1.125rem); line-height: 1.55; | |
text-fluid-xl | font-size: clamp(1.125rem, 1.0761rem + 0.2174vw, 1.25rem); line-height: 1.45; | |
text-fluid-2xl | font-size: clamp(1.25rem, 1.1522rem + 0.4348vw, 1.5rem); line-height: 1.3; | |
text-fluid-3xl | font-size: clamp(1.5rem, 1.3533rem + 0.6522vw, 1.875rem); line-height: 1.2; | |
text-fluid-4xl | font-size: clamp(1.75rem, 1.5543rem + 0.8696vw, 2.25rem); line-height: 1.15; | |
text-fluid-5xl | font-size: clamp(2rem, 1.6087rem + 1.7391vw, 3rem); line-height: 1.1; | |
text-fluid-6xl | font-size: clamp(2.25rem, 1.663rem + 2.6087vw, 3.75rem); line-height: 1.05; |
Font weight 9
Variants: sm:md:lg:xl:2xl:print:screen:
| Class | CSS |
|---|---|
font-thin | font-weight: 100; |
font-extralight | font-weight: 200; |
font-light | font-weight: 300; |
font-normal | font-weight: 400; |
font-medium | font-weight: 500; |
font-semibold | font-weight: 600; |
font-bold | font-weight: 700; |
font-extrabold | font-weight: 800; |
font-black | font-weight: 900; |
Font style 2
Variants: none
| Class | CSS |
|---|---|
italic | font-style: italic; |
not-italic | font-style: normal; |
Font smoothing 2
Variants: none
| Class | CSS |
|---|---|
antialiased | -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; |
subpixel-antialiased | -webkit-font-smoothing: auto; -moz-osx-font-smoothing: auto; |
Font variant numeric 4
Variants: none
| Class | CSS |
|---|---|
normal-nums | font-variant-numeric: normal; |
tabular-nums | font-variant-numeric: tabular-nums; |
proportional-nums | font-variant-numeric: proportional-nums; |
slashed-zero | font-variant-numeric: slashed-zero; |
Line height 14
Variants: none
| Class | CSS |
|---|---|
leading-none | line-height: 1; |
leading-tight | line-height: 1.25; |
leading-snug | line-height: 1.375; |
leading-normal | line-height: 1.5; |
leading-relaxed | line-height: 1.625; |
leading-loose | line-height: 2; |
leading-3 | line-height: 0.75rem; |
leading-4 | line-height: 1rem; |
leading-5 | line-height: 1.25rem; |
leading-6 | line-height: 1.5rem; |
leading-7 | line-height: 1.75rem; |
leading-8 | line-height: 2rem; |
leading-9 | line-height: 2.25rem; |
leading-10 | line-height: 2.5rem; |
Letter spacing 6
Variants: none
| Class | CSS |
|---|---|
tracking-tighter | letter-spacing: -0.05em; |
tracking-tight | letter-spacing: -0.025em; |
tracking-normal | letter-spacing: 0em; |
tracking-wide | letter-spacing: 0.025em; |
tracking-wider | letter-spacing: 0.05em; |
tracking-widest | letter-spacing: 0.1em; |
Text align 6
Variants: listed per class
| Class | CSS | Variants |
|---|---|---|
text-left | text-align: left; | rtl ltr sm md lg xl 2xl @xs @sm @md @lg @xl print screen |
text-center | text-align: center; | sm md lg xl 2xl @xs @sm @md @lg @xl print screen |
text-right | text-align: right; | rtl ltr sm md lg xl 2xl @xs @sm @md @lg @xl print screen |
text-justify | text-align: justify; | sm md lg xl 2xl print screen |
text-start | text-align: start; | sm md lg xl 2xl print screen |
text-end | text-align: end; | sm md lg xl 2xl print screen |
Text decoration line 4
Variants: listed per class
| Class | CSS | Variants |
|---|---|---|
underline | text-decoration-line: underline; | hover active group-hover peer-checked forced-colors |
overline | text-decoration-line: overline; | |
line-through | text-decoration-line: line-through; | |
no-underline | text-decoration-line: none; | hover active group-hover peer-checked forced-colors |
Text decoration style 5
Variants: none
| Class | CSS |
|---|---|
decoration-solid | text-decoration-style: solid; |
decoration-double | text-decoration-style: double; |
decoration-dotted | text-decoration-style: dotted; |
decoration-dashed | text-decoration-style: dashed; |
decoration-wavy | text-decoration-style: wavy; |
Text decoration thickness 7
Variants: none
| Class | CSS |
|---|---|
decoration-0 | text-decoration-thickness: 0px; |
decoration-1 | text-decoration-thickness: 1px; |
decoration-2 | text-decoration-thickness: 2px; |
decoration-4 | text-decoration-thickness: 4px; |
decoration-8 | text-decoration-thickness: 8px; |
decoration-auto | text-decoration-thickness: auto; |
decoration-from-font | text-decoration-thickness: from-font; |
Text underline offset 6
Variants: none
| Class | CSS |
|---|---|
underline-offset-0 | text-underline-offset: 0px; |
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; |
underline-offset-auto | text-underline-offset: auto; |
Text transform 4
Variants: none
| Class | CSS |
|---|---|
uppercase | text-transform: uppercase; |
lowercase | text-transform: lowercase; |
capitalize | text-transform: capitalize; |
normal-case | text-transform: none; |
Overflow 8
Variants: none
| Class | CSS |
|---|---|
truncate | overflow: hidden; text-overflow: ellipsis; white-space: nowrap; |
line-clamp-1 | overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; |
line-clamp-2 | overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; |
line-clamp-3 | overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; |
line-clamp-4 | overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; |
line-clamp-5 | overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 5; |
line-clamp-6 | overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 6; |
line-clamp-none | overflow: visible; display: block; -webkit-box-orient: horizontal; -webkit-line-clamp: unset; |
Text overflow 2
Variants: none
| Class | CSS |
|---|---|
text-ellipsis | text-overflow: ellipsis; |
text-clip | text-overflow: clip; |
White space 6
Variants: none
| Class | CSS |
|---|---|
whitespace-normal | white-space: normal; |
whitespace-nowrap | white-space: nowrap; |
whitespace-pre | white-space: pre; |
whitespace-pre-line | white-space: pre-line; |
whitespace-pre-wrap | white-space: pre-wrap; |
whitespace-break-spaces | white-space: break-spaces; |
Overflow wrap 2
Variants: none
| Class | CSS |
|---|---|
break-normal | overflow-wrap: normal; word-break: normal; |
break-words | overflow-wrap: break-word; |
Word break 2
Variants: none
| Class | CSS |
|---|---|
break-all | word-break: break-all; |
break-keep | word-break: keep-all; |
Text wrap 4
Variants: none
| Class | CSS |
|---|---|
text-wrap | text-wrap: wrap; |
text-nowrap | text-wrap: nowrap; |
text-balance | text-wrap: balance; |
text-pretty | text-wrap: pretty; |
Hyphens 3
Variants: none
| Class | CSS |
|---|---|
hyphens-none | -webkit-hyphens: none; hyphens: none; |
hyphens-manual | -webkit-hyphens: manual; hyphens: manual; |
hyphens-auto | -webkit-hyphens: auto; hyphens: auto; |
Vertical align 8
Variants: none
| Class | CSS |
|---|---|
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; |
align-sub | vertical-align: sub; |
align-super | vertical-align: super; |
List style type 3
Variants: none
| Class | CSS |
|---|---|
list-none | list-style-type: none; |
list-disc | list-style-type: disc; |
list-decimal | list-style-type: decimal; |
List style position 2
Variants: none
| Class | CSS |
|---|---|
list-inside | list-style-position: inside; |
list-outside | list-style-position: outside; |
Text indent 6
Variants: none
| Class | CSS |
|---|---|
indent-0 | text-indent: 0; |
indent-1 | text-indent: 0.25rem; |
indent-2 | text-indent: 0.5rem; |
indent-4 | text-indent: 1rem; |
indent-8 | text-indent: 2rem; |
indent-px | text-indent: 1px; |