Last updated: 5 May 2024

Tailwind CSS Letter-spacing

The letter-spacing utility class in Tailwind CSS allows you to adjust the spacing between characters in text.


Tailwind Letter Spacing

The letter-spacing utility class in Tailwind CSS allows you to adjust the spacing between characters in text. With Tailwind's letter-spacing class, you can increase or decrease the spacing between letters to achieve the desired typography style.

Applying Letter Spacing

To apply letter spacing to an element, you can use the tracking-{amount} utility class, where {amount} represents the spacing value.

  • tracking-tighter: Applies tighter letter spacing.
  • tracking-tight: Applies tight letter spacing.
  • tracking-normal: Applies normal letter spacing.
  • tracking-wide: Applies wide letter spacing.
  • tracking-wider: Applies even wider letter spacing.
  • tracking-widest: Applies the widest letter spacing.
html
<div class="tracking-tighter">Lorem ipsum dolor sit amet.</div>
<div class="tracking-widest">Lorem ipsum dolor sit amet.</div>

Preview

Lorem ipsum dolor sit amet.

Lorem ipsum dolor sit amet.

Responsive Letter Spacing

Tailwind CSS allows you to apply letter spacing classes responsively at different breakpoints. To use responsive letter spacing classes, you can append the breakpoint prefix to the utility class. For example, md:tracking-wide applies wider letter spacing starting from the medium breakpoint and above.

html
<p class="tracking-normal md:tracking-wide">Lorem ipsum dolor sit amet.</p>

In the above example, the letter spacing is set to normal by default (tracking-normal), but starting from the medium breakpoint and above, the letter spacing is changed to wider (md:tracking-wide).

Tailwind Letter Spacing Class Table

ClassProperties
tracking-tighterletter-spacing: -0.05em;
tracking-tight letter-spacing: -0.025em;
tracking-normalletter-spacing: 0em;
tracking-wide letter-spacing: 0.025em;
tracking-wider letter-spacing: 0.05em;
tracking-widestletter-spacing: 0.1em;

Windframe Tailwind blocks

Landing page

Windframe is a drag and drop builder for rapidly building tailwind css websites and UIs

Start building stunning tailwind UIs! 

Build from scratch or select prebuilt tailwind templates