Common patterns
p-4 px-6 py-3 m-4 mt-8 mx-auto gap-3 gap-6 inset-0 top-4 w-12 h-12 min-h-8
Use a stable spacing scale for layout rhythm, component consistency, and predictable utility output.
The spacing scale powers margin, padding, gap, inset, width, and height utilities. Keep the scale tight and intentional.
{
"spacing": {
"scale": {
"0": "0",
"1": "0.25rem",
"2": "0.5rem",
"3": "0.75rem",
"4": "1rem",
"6": "1.5rem",
"8": "2rem",
"12": "3rem"
}
}
}p-4 px-6 py-3 m-4 mt-8 mx-auto gap-3 gap-6 inset-0 top-4 w-12 h-12 min-h-8
Next step
Continue to Typography to define readable type scales and line heights.