Skip to content

Typography

Line Height

Utilities for controlling the leading (line height) of an element.

Quick reference

ClassDescription
leading-noneline-height: 1
leading-xsline-height: var(--w-line-height-xs)
leading-sline-height: var(--w-line-height-s)
leading-mline-height: var(--w-line-height-m)
leading-mlline-height: var(--w-line-height-ml)
leading-lline-height: var(--w-line-height-l)
leading-xlline-height: var(--w-line-height-xl)
leading-xxlline-height: var(--w-line-height-xxl)
leading-xxxlline-height: var(--w-line-height-xxxl)

Basic usage

Setting the line-height

Control the Line-height of an element using the leading-{size} utilities.

leading-none

The quick smart warp scientist

leading-xs

The quick smart warp scientist

leading-s

The quick smart warp scientist

leading-m

The quick smart warp scientist

leading-ml

The quick smart warp scientist

leading-l

The quick smart warp scientist

leading-xl

The quick smart warp scientist

leading-xxl

The quick smart warp scientist

leading-xxxl

The quick smart warp scientist

html
<p class="leading-xs ...">The quick smart warp scientist ...</p>
<p class="leading-s ...">The quick smart warp scientist ...</p>
...
<p class="leading-xxl ...">The quick smart warp scientist ...</p>
<p class="leading-xxxl ...">The quick smart warp scientist ...</p>

Arbitrary values

If you need to use a one-off line-height value, use square brackets to generate a property on the fly using any arbitrary value.

The quick smart warp scientist

html
<p class="leading-[120]"></p>

Released under the Apache 2.0 License.