Nobody needs a border to know that a label belongs to the field under it. Distance does that job on its own, and designers call the effect proximity.
The idea traces back to Max Wertheimer, who published his Gestalt law of grouping in 1923. These days it shows up in forms, navigation menus, cards and paragraph spacing.
Wertheimer demonstrated the effect with series of dots and gave no numbers for it. Later dot-lattice studies found that grouping depended on only the relative distance between dots across the lattices tested (Joseph Brooks, Oxford Handbook of Perceptual Organization, 2015), so the gap between groups matters in proportion to the gap inside them.
What Is Proximity in Design?

Elements set close together get read as one unit, and elements set apart get read as separate ones. No border, color or icon has to be involved. The effect comes straight out of the Gestalt law of grouping by nearness, and in layout work it turns into a spacing rule: keep related things tight and unrelated things apart.
The word has other meanings. A proximity sensor detects nearby objects, and geographic proximity measures physical distance. Neither one describes how a viewer groups shapes on a page.
One small distinction is worth keeping straight. The law of proximity describes what the eye does, and the proximity principle is what a designer does about it.
It sits among the core graphic design principles and usually gets taught in the same unit as alignment and repetition. Contrast tags along too.
How Does the Gestalt Law of Proximity Work?
The visual system groups the elements with the smallest gaps between them and treats larger gaps as boundaries. Max Wertheimer demonstrated this with rows of dots in 1923, and the grouping holds against color or shape differences as long as the gaps differ clearly.
Origin in Gestalt psychology
Wertheimer published the grouping factors in Psychologische Forschung in 1923 under the German title “Untersuchungen zur Lehre von der Gestalt II”. The English translation, “Laws of Organization in Perceptual Forms”, came out in 1938. Kurt Koffka and Wolfgang Köhler worked with him on the Gestalt principles, and the three are credited together (Adobe XD Ideas, 2021).
His setup was a series of dots spaced unevenly with no other cue, and the natural grouping followed the smallest interval. The same grouping applies to sound, with taps separated by pauses.
Proximity comes first in Wertheimer’s paper, ahead of similarity. The wider set of Gestalt principles grew out of that work.
What the eye does with distance
Wertheimer showed the effect through demonstrations and gave no numbers for it. Oyama measured it in 1961 with dot lattices, and grouping along the shorter spacing followed a power function of the relative distance, according to Joseph Brooks’s review in the Oxford Handbook of Perceptual Organization (2015).
Kubovy and colleagues later tested lattices across many layouts and found that relative distance was the only factor driving grouping in them. They named it the pure distance law. Brooks adds that later work found curvilinear structure can also influence grouping by proximity, so distance alone explains grouping only within the lattices tested.
For design work, that makes it a ratio rule and not a pixel rule.
Proximity isn’t absolute either. Brooks describes the grouping principles as holding when other factors are equal, and Wertheimer tested the balance by widening the interval until similarity took over. When the gaps are nearly equal, grouping turns ambiguous and color similarity can pull the other way. When they’re clearly unequal, distance wins over a competing color cue.
Obvious groups help task-focused users find and focus on the elements tied to their task, per Nielsen Norman Group (Harley, 2020).
How Much Space Should Separate Related and Unrelated Elements?
The gap inside a group should be visibly smaller than the gap between groups, and both should come from one spacing scale. As of November 2026, Ant Design’s proximity specification defines small, middle and large vertical spacing as 8, 16 and 24 px. That puts the small tier at half the middle one and a third of the large one.
The perception research points the same way. Grouping tracks the ratio between gaps, so a scale with clear steps separates groups, and near-equal gaps leave them ambiguous.
Spacing inside and between groups
Spacing inside a component is micro proximity: label to field, icon to text, caption to image. Section to section and card to card is macro proximity.
Most of the separating is done by white space between the groups, and adding or removing it either unites or splits elements (Adobe XD Ideas, 2021).
A worked example with the Ant Design tiers shows the difference on one form.
| Setup | Label to its field | Field to next label | What the viewer sees |
|---|---|---|---|
| Equal gaps | 16 px | 16 px | Labels float between fields, ownership unclear |
| Stepped gaps | 8 px | 24 px | Each label and field reads as one pair |
| Stepped, plus section gap | 8 px | 24 px | Pairs read as pairs, and sections read as sections (48 px between sections) |
The values are an illustration built from the Ant Design formula (8 + 8n px), not a published recommendation for forms.
Spacing scales in design systems
Spacing scales exist so that nobody picks gaps by eye.
Ant Design’s vertical spacing runs 8 px for small, 16 px for middle and 24 px for large, and its formula is y = 8 + 8n, where n is 0 or higher. Material Design aligns components to an 8dp baseline grid, with type and icons on a 4dp grid.
WCAG 2.2 criterion 1.4.12 (Level AA) is a different kind of number. Layouts must survive line height set to 1.5 times the font size, paragraph spacing set to 2 times the font size, letter spacing set to 0.12 times the font size, and word spacing set to 0.16 times the font size. Those values are a stress test, not a target. The criterion checks that nothing breaks when a user applies them, and it sets no spacing targets for authors (W3C).
Pick one base unit and stay on it. Material Design’s split by size is a reasonable model, with 4dp for small components such as icons and type and 8dp for layout.
Where Does Proximity Show Up in Real Layouts?

Typography
Text is the oldest proximity layout.
Sentences group into paragraphs, and paragraphs group under headings through whitespace alone. A heading belongs with the text below it, so that text sits closer to the heading than the previous section does (Nielsen Norman Group, 2020).
Line spacing, known in typography as leading, sets the tightest gap in the system. The gaps between paragraphs and sections step up from there. A paragraph’s lines sit closest, the gap between paragraphs is wider because it separates ideas, and the space under a heading is smaller than the space above it.
Forms
A single form with 12 fields looks heavier than a form of 3 chunks with 4 fields each, even though the input is identical, according to Nielsen Norman Group (Harley, 2020).
Top-aligned labels with a minimal gap show which label owns which field, and a larger gap before the next pair closes off the previous one. Adobe XD Ideas (2021) singles out forms with seven or more fields, where users lose time working out which label belongs to which field.
Chunking works inside a single value as well. Compare +18005550123 with +1 (800) 555-0123, which is easier to scan and check.
Navigation
Wellington City Council’s desktop header puts Search on the same line as the main navigation. Extra whitespace to its left marks it as a different kind of function, though it shares the menu’s font treatment (Nielsen Norman Group, 2020).
On tablet there is no room for that gap, so the site moves Search up into the utility menu to stop it reading as part of the main navigation.
Menus work the same way. Primary links cluster together, and the utility links sit apart in a cluster of their own.
Cards and listings
A card keeps the image next to the title and price, then leaves a wider gap before the next card. Google’s results page does the same with each result, and Laws of UX notes that the spacing groups every result into its own cluster.
Adobe XD Ideas (2021) names organizing information and building visual hierarchy as the purpose of proximity. Cards show it plainly. The eye reads cluster by cluster and not element by element.
Data displays
Charts and tables apply the rule to labels and rows. A label placed beside its bar or line groups with it by distance. A legend in a corner ties to a series by color match, which is similarity and not proximity. Table rows keep tight space inside a row and a wider gap between row groups.
Pick the cue that costs the reader the fewest comparisons.
How Proximity Interacts With Similarity, Common Region and Alignment

Proximity forms the group. Similarity can compete with it, and alignment tidies things up afterward. Common region is the one that can override it, according to Nielsen Norman Group (Harley, 2020), which singles it out as the cue that can overpower proximity.
| Principle | Cue | Relation to proximity | Reach for it when |
|---|---|---|---|
| Similarity | Shared color, shape, or size | Competes with it | Separate groups must read as the same kind of element |
| Common region | Border or background container | Can override it | Spacing cannot change, or element types are mixed |
| Alignment | Shared edge or axis | Supports it | The gaps are set and the group needs a clean edge |
| White space | Empty area between items | The mechanism behind it | Always |
Proximity versus similarity
Design guides treat the two as rivals. Vision science is less sure of that. Joseph Brooks (2015) notes that proximity can be read as similarity of position, though it remains unclear whether the two share mechanisms.
In practice, proximity tells the viewer which group an element is in. What kind of element it is, similarity handles.
Common region: when space is not enough
Stephen Palmer introduced common region in 1992. Items inside a shared boundary are perceived as a group and assumed to share some characteristic or function (Nielsen Norman Group, 2020).
It earns its place when spacing can’t change, or when one group holds several element types. If spacing already makes the groups clear, skip it.
The Food Network tablet app showed the fix. An older version left large gaps under recipe titles, so users had trouble telling which byline and rating belonged to which recipe, and a later version enclosed each recipe in a card.
Borders carry a cost. NN/g warns that extra boxes add clutter, and that full-width bordered sections can create false floors that may stop users from scrolling.
Try spacing first, and add a border or background only if the groups still read as one.
Alignment and white space
Alignment gives each group a shared edge, so its boundary is easy to see. Proximity creates the group, and clean alignment finishes it.
White space is the material both work with. A page full of it has no proximity relationships unless the gaps differ in size.
How to Apply Proximity to a Layout, Step by Step
The order matters here, since each step feeds the next.
- Sort the elements by what they do for the user’s task, such as shipping details in one group and billing details in another (Nielsen Norman Group, 2020).
- Pick one inner gap and one outer gap from the spacing scale. The outer gap should be clearly larger.
- Place every label, caption and heading nearer to its own item than to any neighbor.
- Give each group a shared edge.
- Add a border or background only where spacing leaves the groups unclear. NN/g suggests asking whether adding or removing white space communicates the grouping, and whether users were confused when the boundaries were absent.
- Resize the layout and re-read the groups at each width.
Step 1 comes first because spacing has nothing to express until the groups are decided. Skip step 5 when the groups already read clearly after step 4.
Implementing Proximity in CSS and Design Tools

In CSS, gap handles the space between siblings in flex, grid and multi-column layouts, and padding handles the space inside a component. Figma auto layout splits the same job into Gap and Padding, and InDesign covers it with Space Before and Space After.
| Tool | Property | Sets |
|---|---|---|
| CSS | gap, row-gap, column-gap | Space between items in a container |
| CSS | padding | Space inside a component |
| Figma auto layout | Gap | Distance between objects in a frame |
| Figma auto layout | Padding | Space from frame edge to its objects |
| InDesign | Space Before, Space After | Space above and below a paragraph |
CSS gap, margin, and padding
The gap shorthand sets row-gap and column-gap together. One value sets both, and two values set the row gap first, then the column gap (MDN).
MDN lists the property as widely available across browsers since October 2017. A few documented behaviors affect grouping. Grid gaps appear only between tracks, never before the first or after the last. Margins, padding and alignment can widen the visible space beyond the gap value. And a percentage gap in a flex container with no explicit size resolves to zero.
That last case removes a group boundary without any error. Use fixed lengths for gaps inside flex containers whose size is not set.
Spacing tokens
Tokens keep inner and outer gaps consistent across components. The Design Tokens Community Group format defines a dimension type for space, with a numeric value and a unit of px or rem.
The Format Module 2025.10 is a Community Group specification, not a W3C Standard. A token can reference another, so changing one gap token updates every alias. On units, rem follows the default font size, which users can change, while px is an idealized pixel on the viewport.
Name the two gap tokens by role, such as inner and outer, instead of by size. A later change to the scale then leaves no misleading name behind.
Tokens Studio’s documentation adds that the DTCG format has no spacing type and points to dimension tokens instead.
Auto layout in Figma and paragraph spacing in InDesign
In Figma, nested auto layout frames each keep their own gap and padding. The inner frame holds the small gap, and the outer frame holds the large one.
A numeric gap fixes the distance, while Auto spreads objects with Between, Around, or Evenly options (Figma Learn, as of November 2026). Auto changes the gap as the frame resizes, so a group’s gap can drift away from its scale.
InDesign controls paragraph gaps with Space Before, Space After, and Space Between Paragraphs Having Same Style. It ignores Space Before when a paragraph starts at the top of a column or frame, and Adobe advises setting paragraph spacing inside paragraph styles for consistency.
When Proximity Fails or Misleads
Equal gaps everywhere mean no groups form, whether the gaps are tight or wide. Adding a clear step between the inner and outer gaps fixes it.
Unrelated neighbors are a quieter problem. Users judge a whole group by one item, so a button parked among unrelated buttons gets overlooked (Nielsen Norman Group, 2020). Group by purpose, not by convenience.
Distance causes trouble too. Task-focused users miss items outside their focal area, such as a skip option in a top corner, far from the main calls to action. Place options beside the actions they change.
Some content needs grouping in two directions at once. A comparison table needs row and column groups, and spacing serves only one of them. Zebra stripes or borders can take one direction while white space handles the other.
Responsive layouts that rearrange groups
Scaling down can shrink gaps or push elements apart, which destroys the grouping, according to Nielsen Norman Group (Harley, 2020).
On the Transport for London Driving page, the Ultra Low Emission Zone and Low Emission Zone links sit side by side on desktop, so users can compare them. On a phone the columns stack and the links land far apart, which can cause mobile users to never find the second zone.
The check is simple. Look at the stacked order at each breakpoint and keep related items adjacent when columns collapse.
User text-spacing overrides
Layouts built on fixed boxes break when users change text spacing for readability. W3C’s Understanding document for criterion 1.4.12 shows text cut off as one failure pattern.
Users who change font spacing push text past boxes that were sized for the default. BOIA (2024) traces most failures to ignoring responsive design, with absolutely positioned content and borders too small for the spaced text as examples.
Clipped text and overlaps can pull a label into the wrong group. Size containers by their content and not by fixed heights, and keep grouped items in normal flow instead of absolute positions. Test with the overrides switched on before release.
Proximity in Design FAQ
Is proximity one of the basic principles of design?
It’s in Robin Williams’s CRAP acronym, next to contrast, repetition and alignment.
The Gestalt laws of grouping include it too, and both traditions describe the same effect, which is that distance signals relationship.
How does proximity differ between graphic design, UI design, and web design?
The perceptual rule is identical in all three. The medium changes how the gaps are kept.
Print fixes its spacing at one page size. UI and web layouts reflow, which means the gaps need checking at every screen width.
Can proximity improve a logo?
Yes. The gap between a mark and its wordmark decides whether they read as one lockup or as two separate items.
Letter spacing within the wordmark and the distance to a tagline follow the same inner-versus-outer gap rule used in page layouts.
Does proximity affect conversion or perceived value?

Indirectly, yes, through findability. Nielsen Norman Group documents buttons grouped with unrelated actions and options placed far from the main task, and users overlook both.
No source reviewed for this article reports a conversion or perceived-value figure for proximity alone.
Testing Proximity Before a Design Ships
Proximity has done its job when viewers can pick out the groups without reading a word. Before release, run these checks in this order:
- A squint or blur test on the static layout
- A five-second test with first-time viewers
- A grouping task at the smallest breakpoint
The order runs from cheapest to costliest, so gap errors get fixed before anyone spends participant time on them. A blur test shows whether gap ratios form groups, but only users can show whether those groups match their task.
The cost is schedule. The third check needs real participants, and skipping it leaves the narrowest layout untested, where stacked columns pull related items apart.
Re-run all three when breakpoints or the type scale change. This sequence reflects sources checked in November 2026.
- How to Design Marketing Materials That People Actually Keep - 27 November 2026
- Behind the Logo: What Font Does Starbucks Use? - 26 November 2026
- Visual Hierarchy in Short Videos: How to Guide Attention Across a Sequence - 26 November 2026