Notes on spacing as rhythm
1 min read
A layout is read over time, top to bottom, the way a piece of music is heard. The gaps between things are not empty; they set the tempo.
Rests are written down
Musicians do not treat silence as the absence of music. A rest has a precise length, and a phrase falls apart if it is wrong. Spacing deserves the same care: not "some padding", but a specific interval chosen for a reason.
A small scale goes a long way
I rarely use more than six spacing values on a page. Fewer choices make the rhythm audible.
export const space = {
hairline: 4, // inside a control
tight: 8, // between label and value
base: 16, // between related items
loose: 32, // between groups
section: 112, // between ideas
} as const;
The jump from loose to section is deliberately large. Big gaps tell the reader that a new thought is starting; they work like a line break in a poem.
If everything is evenly spaced, nothing is grouped.
Listening to a page
My favourite spacing check has nothing to do with numbers. I scroll slowly and pay attention to where my eye wants to rest. If it stops somewhere unexpected, a gap is wrong. If it never stops at all, the page needs more silence.