Post Title
Readable paragraph with optimal vertical rhythm.
Tailwind line height utility classes controls the line height to an element. These utility classes are named using the format leading-{keyword}, where {keyword} represents the line height value.
Line height is one of those CSS properties you don't think about until your text looks weirdly cramped or your headlines have giant gaps between lines. Tailwind's leading-* utilities give you control over vertical spacing in your text, and once you understand the system, you'll wonder how you ever lived without it.
Tailwind splits line height into two camps, and picking the right one matters:
Relative values– These scale with your font size. If you change text-lg to text-2xl, the line height adjusts proportionally.
Fixed values– These stay locked at a specific pixel height no matter what. Your text-sm and text-4xl could have the exact same line spacing if you wanted (though you probably shouldn't).
Most of the time, you'll use relative values. Fixed values are for when you're matching a strict design spec or need pixel-perfect control.
These are your everyday workhorses:
leading-none: Sets the line height to none, causing the lines to overlap.leading-tight: Sets a tight line height, reducing the spacing between lines.leading-snug: Sets a snug line height, slightly reducing the spacing between lines.leading-normal: Sets the default line height.leading-relaxed: Sets a relaxed line height, increasing the spacing between lines.leading-loose: Sets a loose line height, further increasing the spacing between lines.<p class="leading-loose"> Lorem ipsum dolor sit amet, consectetur adipisicing elit. Assumenda, quia temporibus eveniet a libero incidunt suscipit.</p><p class="leading-snug"> Lorem ipsum dolor sit amet, consectetur adipisicing elit. Assumenda, quia temporibus eveniet a libero incidunt suscipit.</p>Leading-relaxed
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Assumenda, quia temporibus eveniet a libero incidunt suscipit.
Leading-tight
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Assumenda, quia temporibus eveniet a libero incidunt suscipit.
The difference is subtle but noticeable. Try both in your own projects and see which one feels right.
leading-none or leading-tight → Headlines, hero text, anything big and bold where you want impactleading-normal → Body text, the default for most paragraph contentleading-relaxed or leading-loose → Long-form articles, documentation, anywhere readability is criticalSometimes you need your line height locked to an exact pixel value. Maybe you're matching a Figma design, or you need predictable spacing in a dashboard layout.
<p class="text-base leading-[42px]"> This paragraph has a fixed line height of 32 pixels.</p><p class="text-base leading-[26px]"> This paragraph has a fixed line height of 32 pixels.</p>Leading-relaxed
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Assumenda, quia temporibus eveniet a libero incidunt suscipit.
Leading-tight
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Assumenda, quia temporibus eveniet a libero incidunt suscipit.
This is especially useful when you're building components that need to align perfectly with other elements. For example, if you have a grid of cards and the text needs to line up across columns, fixed line height prevents text from shifting around.
Warning: Be careful with fixed values on small font sizes. If you set text-sm leading-[40px], you'll get weird gaps. Fixed line height works best when you know exactly what font size you're dealing with.
You can (and should) adjust line height at different screen sizes:
<p class="leading-normal md:leading-loose">Lorem ipsum dolor sit amet.</p>Lorem ipsum dolor sit amet.
This pattern works well when you need mobile density without sacrificing readability on desktops.
If you find yourself using the same arbitrary values repeatedly, add them to your Tailwind config:
module.exports = { theme: { extend: { lineHeight: { "extra-tight": "1.1", "extra-loose": "3.5", // Adding a custom line height }, }, },};Use these custom classes in your HTML:
<p class="leading-extra-tight"> This paragraph has a custom line height of 1.1.</p><p class="leading-extra-loose"> This paragraph has a custom line height of 2.5.</p>This paragraph has a custom line height of 1.1.
This paragraph has a custom line height of 3.5.
This keeps your HTML cleaner and makes your design system more explicit. Plus, if you ever need to tweak that value, you change it in one place instead of hunting through dozens of files.
<article class="prose prose-lg leading-relaxed"> <h1 class="text-3xl leading-tight font-bold">Post Title</h1> <p>Readable paragraph with optimal vertical rhythm.</p></article>Readable paragraph with optimal vertical rhythm.
For blog posts, leading-relaxed on body text reduces eye strain. Titles get leading-tight to keep them punchy.
<label class="block text-sm leading-snug text-gray-600 mb-1"> Email address</label><input class="w-full p-2 border rounded" />Remember me
Don't have account? Signup
leading-snug on labels keeps them close to their inputs without feeling squished. This is one of those micro-optimizations that makes forms feel more polished.
<h1 class="text-5xl leading-none font-extrabold tracking-tight"> Make bold moves.</h1>Make bold moves.
leading-none on the headline creates that trendy, stacked look. The subheading uses leading-relaxed for contrast and readability.
<!-- Don't do this --><h1 class="text-5xl leading-loose">Giant Title</h1>Huge text with loose line height looks ridiculous. Use leading-tight or leading-none for headlines.
<!-- This is hard to read --><p class="text-xs leading-tight"> Tiny text with tight spacing strains the eyes.</p>
<!-- Better --><p class="text-xs leading-relaxed"> Small text needs MORE line height, not less.</p>Smaller fonts need proportionally more line height to remain legible.
<!-- Awkward --><p class="text-base leading-normal md:text-2xl"> This looks fine on mobile but weird on desktop.</p>
<!-- Better --><p class="text-base leading-normal md:text-2xl md:leading-snug"> Line height adjusts with font size.</p>Always reconsider line height when you change font size at breakpoints.
| Class | Properties |
|---|---|
| leading-3 | line-height: .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; |
| 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; |
Now that you’ve mastered Tailwind line Height, try experimenting with:
Practical Typography by Matthew Butterick – Deep dive into line spacing principles
Tailwind CSS Typography Plugin – Handles line height automatically for prose
Line height isn't sexy, but it's one of those foundational skills that separates okay designs from great ones. Start with Tailwind's defaults (leading-normal for body text, leading-tight for headlines), then adjust based on what looks good. And remember: if your text feels cramped or floaty, line height is probably the culprit. Tweak it until it feels right.
Windframe is an AI visual editor for rapidly building stunning web UIs & websites
