Tailwind font size
Use the text-*
utility classes to set the font size.
text-xs
→ ...text-base
... → ...text-9xl
What these values actually mean is configurable - so will change. See the documentation for the default values.
See Font Size from the Tailwind documentation
line-height
To set line-height
at the same time as font-size
, use a "line height modifier".
Meaning, a /
followed by a value representing the line height.
The value is anything that would follow the utility class leading-*
.
html
<button class="text-sm/relaxed">
relaxin' 🏝️
</button>