Skip to content

Line Height

Use leading-{value} utilities to control the line height of text. Named values set a multiplier relative to the font size. Numeric values set an absolute line height using the spacing scale (requires a font size class like text-base to take effect). Tailwind v4 also supports a slash syntax text-<size>/<number> that sets font-size and line-height together.


Use font size utilities like text-sm/6 and text-sm/8 to set the font size and line-height of an element at the same time:

Style('text-sm/6 ...', child: Text('So I started to walk into the water...'))
Style('text-sm/7 ...', child: Text('So I started to walk into the water...'))
Style('text-sm/8 ...', child: Text('So I started to walk into the water...'))

Use leading-<number> utilities like leading-6 and leading-7 to set the line height of an element independent of the font-size:

Style('leading-6', child: Text('So I started to walk into the water...'))
Style('leading-7', child: Text('So I started to walk into the water...'))
Style('leading-8', child: Text('So I started to walk into the water...'))

Use the leading-none utility to set the line height of an element equal to its font size:

Style('text-2xl leading-none ...', child: Text('The quick brown fox...'))
ClassLine Height
leading-none1.0
leading-tight1.25
leading-snug1.375
leading-normal1.5
leading-relaxed1.625
leading-loose2.0
ClassLine Height
leading-312px
leading-416px
leading-520px
leading-624px
leading-728px
leading-832px
leading-936px
leading-1040px

Slash syntax (font-size + line-height combined)

Section titled “Slash syntax (font-size + line-height combined)”

Tailwind v4 packs both axes into a single class. The line-height portion uses the spacing scale: <number> × 4px.

ClassFont SizeLine Height
text-sm/614px24px
text-sm/714px28px
text-sm/814px32px

The same pattern works with any font-size keyword (e.g. text-base/7, text-lg/8).