11 / 18

Principle 11

Space separates before lines do

Space is the quietest way to say these things belong together and those do not. Borders, shadows and fills are louder tools; use one of them at a time, and only when space is not enough.

In a real interface

✕ Avoid

  • Smoked
  • Citrus
  • Floral

✓ Do

  • Smoked
  • Citrus
  • Floral

01

Why

NN/g explains that items close together are perceived as one group, and that proximity can overpower competing cues such as similarity of color or shape. Space already does most of the separating.

Refactoring UI makes the same point from the other side: borders are a good way to distinguish two elements, but using too many of them makes a design feel busy and cluttered.

02

How to apply it

Start with more space between groups than inside them. If that is not enough, pick one tool: a different background, a soft shadow or a line. Refactoring UI lists exactly those three as the alternatives to a border.

Never stack them. A border, a shadow and a fill on the same edge all repeat the same message and add weight without adding meaning.

03

Edge cases

Dense tables and long forms may need lines, because space alone would make them too tall. Interactive controls still need visible edges so people can find them; separating content is not the same as marking what can be pressed.

✓ Do

  • Put more space between groups than within them
  • Try space first, then one tool
  • Use a background change for large regions
  • Keep visible edges on controls

✕ Avoid

  • Box every element in a border
  • Combine border, shadow and fill on one edge
  • Separate with lines what space already groups
  • Shrink gaps to fit more and add dividers back

For agents · PRINCIPLE.md

## Space separates before lines do

 

- Put more space between groups than inside them.

- If space is not enough, add one tool: a background change, a soft shadow or a line.

- Never combine a border, a shadow and a fill on the same edge.

- Keep visible edges on interactive controls.

Enforced byBADESIGN one separation method per boundarykero-method separates with space before lines