UX Law 09 of 30 · Gestalt
Law of Proximity
Things placed close together look like they belong together.

At a wedding, you glance across the hall and instantly know who came with whom. Nobody is wearing a label. The couple standing close by the stage are together; the three aunties a little further off are another group. You read it all from the gaps between people.
That’s the Law of Proximity. Things placed close together look like they belong together, and the space between them tells you where one group ends and the next begins.
What is the Law of Proximity?
The Law of Proximity says that objects placed near each other are seen as a group, while objects further apart are seen as separate. Space alone is enough to show what belongs together.
On a screen, spacing is a message. When a label sits close to a field, people read them as a pair. When a price sits close to a product name, they read them as one item. Every gap tells the user what goes with what, whether you planned it or not.
That’s why spacing isn’t decoration you add at the end. It’s structure. Get it right and you often don’t need lines, boxes or backgrounds to show groups at all. Get it wrong and even a well-written screen feels jumbled.
Why it happens
Proximity is one of the Gestalt principles, described by German psychologists Max Wertheimer, Kurt Koffka and Wolfgang Köhler in the early 20th century. Their central idea was that we see wholes before parts: the mind organises what the eyes take in into patterns, without being asked.
In 1923, Wertheimer showed people a row of evenly spaced dots, then the same dots with some gaps made a little wider. They stopped seeing one row and started seeing pairs. Nothing about the dots had changed except the space between them. Grouping by distance happens so fast that we rarely notice it happening at all.
Law of Proximity examples in real life
You have seen this many times already. A few places it shows up:
A kitchen shelf
Spices sit together in one box, utensils on another shelf, and the pressure cooker near the stove. You find things quickly because related things live near each other.
Chat bubbles in WhatsApp
When the same person sends several messages in a row, WhatsApp stacks them with only a small gap between them. When someone else replies, the gap grows. You can see who said what before reading a word.
Product cards in shopping apps
In a list of search results, each product’s photo, name, price and rating sit tightly together, with more space before the next product. Your eye reads each block as one item, so you don’t mix up one product’s price with another’s.
The Settings app on an iPhone
Settings are split into groups with a clear gap between each. Wi-Fi and Bluetooth sit in one group; Privacy & Security sits in another. The gaps tell you which settings are related before you read any of them.
The problem
What goes wrong when you ignore the Law of Proximity
Imagine a sign-up form where every label and field is spaced exactly 24 px apart. Each label floats halfway between the field above it and the field below it. People type their phone number into the email box, see an error, and can’t tell which field it belongs to. Nothing on the form is wrong except the spacing, and that’s enough to make people quit.
The common mistake
Equal spacing everywhere, so a label looks as close to the wrong field as to the right one.
The solution
How to use the Law of Proximity in UI/UX design
- 1
Put labels next to their fields
Keep each label much closer to its own field than to anything else, for example 4 to 8 px above it, with 16 to 24 px before the next label. Put helper text and error messages right under the field they describe, not at the top of the form.
- 2
Add extra space between groups
Group related fields, like the lines of an address, and leave a clearly bigger gap between groups. A common rule of thumb is to make the space between groups at least twice the space inside them, so the difference is obvious at a glance.
- 3
Try spacing before adding lines
Before you reach for a divider, border or card, try adding space. Extra lines add visual noise and make a screen feel busy. Use them only when spacing alone can’t do the job, like in a dense table.
Rule to remember
Related things close. Unrelated things apart.
Try it yourself
Open the Settings app on your phone and squint until you can’t read the words. You will still see the groups, just from the gaps. Now do the same with a form in any app you use. If everything blurs into one even column, its spacing isn’t telling you anything.
Where the Law of Proximity comes from
One of the Gestalt principles of perception, described by German psychologists Max Wertheimer, Kurt Koffka and Wolfgang Köhler in the early 20th century.
Sources and further reading
- Max Wertheimer, “Untersuchungen zur Lehre von der Gestalt II” (Laws of Organization in Perceptual Forms), Psychologische Forschung, 1923.
- Kurt Koffka, Principles of Gestalt Psychology, Harcourt, Brace and Company, 1935.
- Jon Yablonski, Laws of UX, O’Reilly Media, 2020.
Law of Proximity: questions people ask
How is the Law of Proximity different from the Law of Common Region?
Proximity groups things by the space between them. Common Region groups them by placing them inside a shared boundary, like a card or a box. Both work. Proximity is lighter, so try it first, and add a boundary when spacing alone isn’t enough.
What are the other Gestalt principles?
The best known are similarity (things that look alike seem related), common region (things inside the same boundary seem grouped), continuity (the eye follows lines and curves), closure (we fill in gaps to see whole shapes) and figure-ground (we separate an object from its background). Proximity is often the first one designers learn, because spacing is in every layout.
Does the Law of Proximity matter for accessibility?
Yes. Clear spacing helps people with low vision, people using screen magnifiers and anyone reading quickly on a small screen. But screen readers don’t perceive space, so groups shown only by spacing should also be marked up in code, for example with fieldset and legend in forms, or with proper headings and lists.
Found this useful? Share it with your team.
Free PDF
Law of Proximity and 29 more laws, in one free guide.
Every law in easy words, with everyday examples and one rule to remember. PDF · 33 pages · 13 MB.
Keep reading
Related UX laws
Law 15 · GestaltLaw of SimilarityThings that look alike are seen as one group, and people expect them to work the same way.Read Law of Similarity
Law 19 · GestaltLaw of Common RegionThings inside the same boundary are seen as one group.Read Law of Common Region
Law 23 · GestaltLaw of Uniform ConnectednessThings joined by a line, colour or shape are seen as one group, even when they are far apart.Read Law of Uniform Connectedness

