Typography

Utilities for controlling text styling including font size, weight, line height, letter spacing, text alignment, and more. Typography is fundamental to good design and readability. In Tailwind v4, typography utilities take advantage of modern CSS features like text-balance, better font metric overrides, and OKLCH color space for more vibrant text colors.

10 utilitiestypography
Official Documentation

Font Family

Sets the font family (typeface) for text. Font family is one of the most important typographic choices for establishing the visual tone of your content and ensuring readability. Tailwind's font family utilities provide system font stacks that look great across different devices and operating systems without requiring custom font loading. In Tailwind v4, font metrics are better handled to reduce layout shift.

<p class="font-sans">The quick brown fox jumps over the lazy dog. (Sans-serif)</p> <p class="font-serif">The quick brown fox jumps over the lazy dog. (Serif)</p> <p class="font-mono">The quick brown fox jumps over the lazy dog. (Monospace)</p>
1 variant3 examples
sansserifmono

Font Size

Controls the size of text. Tailwind provides a comprehensive type scale that follows a harmonious progression, making it easy to create consistent typography across your project. Each text size utility also sets an appropriate default line-height, which you can override with line-height utilities when needed. In Tailwind v4, font-size utilities are enhanced with improved default line heights and support for modern CSS units.

<p class="text-xs">Extra small text (0.75rem).</p> <p class="text-sm">Small text (0.875rem).</p> <p class="text-base">Base text (1rem).</p> <p class="text-lg">Large text (1.125rem).</p> <p class="text-xl">Extra large text (1.25rem).</p> <p class="text-2xl">2xl text (1.5rem).</p> <p class="text-3xl">3xl text (1.875rem).</p> <p class="text-4xl">4xl text (2.25rem).</p> <p class="text-5xl">5xl text (3rem).</p>
1 variant4 examples
xssmbase+10

Font Smoothing

Controls the font smoothing and antialiasing applied to text, which can dramatically improve text rendering on certain screens and operating systems. These utilities are especially useful for light text on dark backgrounds, custom fonts, and larger text where rendering quality is more noticeable. In Tailwind v4, font smoothing has improved integration with system fonts.

<div class="font-bold text-xl mb-4">Default smoothing</div> <div class="antialiased font-bold text-xl mb-4">Antialiased (smoother)</div> <div class="subpixel-antialiased font-bold text-xl">Subpixel antialiased</div>
1 variant4 examples
antialiasedsubpixel-antialiased

Font Style

Controls whether text is displayed in an italic style or with normal font style. Italic text can add emphasis, indicate citations or titles, or create visual contrast within your typography. Font style utilities are simple but powerful for adding typographic nuance to your content. In Tailwind v4, font style utilities integrate better with custom fonts and variable fonts.

<p class="italic">This text is italic.</p> <p class="not-italic">This text is not italic (normal).</p>
1 variant4 examples
italicnot-italic

Font Weight

Controls the weight (thickness) of the font. Font weight is essential for establishing visual hierarchy, emphasis, and readability. Tailwind provides a range of font weights from thin to black, allowing you to create contrast and focus within your typography. In Tailwind v4, font weight utilities are optimized for variable fonts and better integration with custom typefaces.

<p class="font-thin">Thin (100)</p> <p class="font-extralight">Extra Light (200)</p> <p class="font-light">Light (300)</p> <p class="font-normal">Normal (400)</p> <p class="font-medium">Medium (500)</p> <p class="font-semibold">Semi Bold (600)</p> <p class="font-bold">Bold (700)</p> <p class="font-extrabold">Extra Bold (800)</p> <p class="font-black">Black (900)</p>
1 variant4 examples
thinextralightlight+6

Letter Spacing

Controls the spacing between letters (characters) in text. Letter spacing can enhance readability, create a more modern look, or add emphasis to specific text elements. Tailwind provides utilities for adjusting letter spacing from tighter to looser settings. In Tailwind v4, letter spacing utilities are optimized for variable fonts and better integration with custom typefaces.

<p class="tracking-tight">Tight letter spacing</p> <p class="tracking-normal">Normal letter spacing</p> <p class="tracking-wide">Wide letter spacing</p>
1 variant4 examples
tightnormalwide

Line Height

Controls the height of lines of text. Line height is crucial for readability and visual comfort, especially in longer paragraphs. Tailwind provides a range of line height utilities that can be applied to text elements to ensure optimal spacing between lines. In Tailwind v4, line height utilities are optimized for variable fonts and better integration with custom typefaces.

<p class="leading-none">No extra space between lines (leading-none)</p> <p class="leading-tight">Tight line height (leading-tight)</p> <p class="leading-normal">Normal line height (leading-normal)</p> <p class="leading-relaxed">Relaxed line height (leading-relaxed)</p> <p class="leading-loose">Loose line height (leading-loose)</p>
1 variant4 examples
nonetightsnug+3

List Style Type

Controls the style of list items in ordered and unordered lists. Tailwind provides utilities for common list styles, including disc, decimal, square, and none. These utilities help you customize the appearance of lists to fit your design needs. In Tailwind v4, list style type utilities are optimized for better integration with custom fonts and variable fonts.

<ul class="list-disc"> <li>Item 1</li> <li>Item 2</li> <li>Item 3</li> </ul> <ol class="list-decimal"> <li>First item</li> <li>Second item</li> <li>Third item</li> </ol>
1 variant4 examples
nonediscdecimal+1

Text Align

Controls the alignment of text within its container. Tailwind provides utilities for left, center, right, and justify text alignment. These utilities help you create a clear visual hierarchy and improve readability in your designs. In Tailwind v4, text alignment utilities are optimized for better integration with custom fonts and variable fonts.

<p class="text-left">Left aligned text</p> <p class="text-center">Center aligned text</p> <p class="text-right">Right aligned text</p> <p class="text-justify">Justified text</p>
1 variant4 examples
leftcenterright+1

Text Decoration

Controls the decoration applied to text, such as underlining or striking through. Text decoration utilities are useful for indicating links, emphasizing text, or showing deleted content. In Tailwind v4, text decoration utilities are optimized for better integration with custom fonts and variable fonts.

<p class="underline">This text is underlined.</p> <p class="line-through">This text has a line through it.</p> <p class="no-underline">This text has no decoration.</p>
1 variant4 examples
underlineline-throughno-underline