Lesson 33 +20 XP

Typography Cheatsheet

Typography Cheatsheet

A quick reference for the most common typography utilities.

Font family & size

GoalClasses
Sans / serif / monofont-sans, font-serif, font-mono
Small texttext-sm
Base texttext-base
Headingtext-2xltext-6xl
Exact sizetext-[15px]

Weight & style

GoalClasses
Normalfont-normal
Mediumfont-medium
Boldfont-bold
Extra boldfont-extrabold
Italicitalic
No italicnot-italic

Alignment

GoalClasses
Lefttext-left
Centertext-center
Righttext-right
Justifytext-justify

Color & decoration

GoalClasses
Muted texttext-gray-500
Primary texttext-sky-600
With opacitytext-gray-900/50
Underlineunderline
Line throughline-through
Uppercaseuppercase

Line height & spacing

GoalClasses
Tightleading-tight
Looseleading-loose
No line heightleading-none
Wider letterstracking-wide
Narrower letterstracking-tight

Wrapping & overflow

GoalClasses
Single-line ellipsistruncate
Balanced headingtext-balance
No wraptext-nowrap
Preformattedwhitespace-pre

Long-form content

GoalClasses
Styled articleprose prose-lg
Gray tintprose-neutral
Dark modedark:prose-invert

TL;DR

  • Size: text-xstext-9xl or text-[15px].
  • Weight: font-bold, font-semibold, font-medium.
  • Color: text-sky-600, opacity /50.
  • Articles: prose from the typography plugin.