Tailwind’s spacing scale uses numeric keys mapped to rem: 1 = 0.25rem, 2 = 0.5rem, 4 = 1rem, 8 = 2rem. The scale is intentionally limited so teams stop debating random pixel values.
Why a scale beats ad hoc pixels
When every developer picks their own padding, interfaces look subtly “off.” A shared scale—similar to tokens in Utility CSS spacing—keeps vertical rhythm consistent across pages.
Common keys
p-2,gap-2— tight inline clustersp-4,gap-4— default card paddingp-6,py-8— section spacing
Self-check
- What rem value does
p-4typically represent? - Why might you choose
gap-3overgap-3.5in a design system?
Challenge
Feel the scale
- Duplicate a box and change
p-4top-8. - Compare
gap-2vsgap-6in a flex row.
Done when: two clearly different spacing rhythms are visible.