← UX laws

Law of Proximity

Wertheimer, 1923PerceptionInteractive

Things placed near each other are read as belonging together, before anyone has decided whether they do.

On its own this is the most obvious law in the collection and the least useful. Of course things close together look related. Nobody needed Gestalt psychology for that, and a demo that only showed you dots moving apart would be a demo of nothing.

The useful part is that proximity is not alone. Colour groups things too. So does a box drawn round them, and so does a line connecting them. In any real interface at least two of these are running at once, and when they disagree, one of them wins — reliably, and not always the one you were designing with.

So the test below is not "do you see groups". It is eight arrangements in which the forces argue, and one question each time: how many groups is that? There is no right answer recorded anywhere. What the page does is compare your answer to what each force would predict, and tell you afterwards which one your eyes were actually following.

PRESS START BELOW
eight arrangements, one question each
Every arrangement holds twenty-four identical dots in the same twenty-four places until a force moves them. Nothing is added except spacing, colour, an outline or a connecting line, so any change in what you see is the force and not the content.

What usually wins

Across the eight, the order tends to come out the same way. A drawn boundary beats everything. Put a box round things and they are a group, whatever their spacing or colour says — which is why cards took over interface design, and why they are so often used to paper over a layout that has no other structure.

A connecting line is nearly as strong, and stronger than colour. Two things joined by a stroke read as one thing even when they are far apart and look nothing alike.

Proximity beats colour more often than people expect. Designers reach for colour to show relatedness because it is easy to add late, and then wonder why the grouping doesn't read — it is losing an argument with the spacing that was set weeks earlier.

What it costs you

Whitespace is not decoration, it is the grouping. Halving a gap to fit a screen is a content change. Every time a designer says a layout feels "off" after a spacing tweak, this is what happened.

You cannot fix bad spacing with colour. If the gaps say three groups and the palette says two, most people will see three and feel that the colour is noise.

A box is a promise. Drawing one around unrelated things makes them related whether you meant it or not — and because boundaries beat everything else, nothing you do inside will undo it.

Related controls belong near each other before they belong to a heading. A label is read; proximity is not. It has already happened by the time reading starts.

I once had a settings page reviewed as "confusing" and spent a week rewriting the labels. The problem was a 16-pixel gap doing the work of a 32-pixel one, and none of my new words fixed it because the grouping was wrong before anybody read a word.

← UX laws

Where the list comes from. The collection I'm working through is Laws of UX by Jon Yablonski — the canonical version, and worth reading in full. His content is licensed CC BY-NC-ND 4.0, which permits sharing but not rewriting, so none of the wording here is his. The laws themselves belong to the psychologists who found them.

Who wrote it. Claude did. The prose, the demonstrations and the statistics, all of it, working from my direction and my edits. I picked the laws, decided what each page had to prove, and threw out the versions that did not. I would rather say that than let you assume otherwise.