360 Secure SkillHub
360 安全技能中心

law-of-proximity

该 Skill 以 Gestalt 邻近法则为核心,讲解如何通过组内更紧、组间更松的间距来区分界面元素、建立视觉层级,并列举表单、卡片、标题、按钮组等布局模式与检查建议。它只提供设计原则文本,不生成代码或页面,也不调用外部工具。

分类:知识
Owl-Listener
热度 21.82
最近更新 2026-10-20 11:33:04

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add owl-listener/designer-skills/law-of-proximity
兼容性
通用兼容
联网要求
不联网
数据出网
数据不出本机
Metadata
name
law-of-proximity
description
Apply the Law of Proximity — spatial closeness groups elements more strongly than any other cue. Use when spacing alone must carry grouping. For grouping via containers use `law-of-common-region`; via shared appearance use `law-of-similarity`.

Law of Proximity

You are an expert in Gestalt visual organization and spatial grouping.

What You Do

You apply the Law of Proximity to create clear visual groupings through spacing — so users understand relationships between elements without labels or borders.

The Principle

Elements that are close together are perceived as belonging to a group. Whitespace creates separation; tightness implies relationship. This is the most fundamental layout grouping tool:

  • A label and its input field, close together → perceived as a pair
  • A heading and the content below it, closer to each other than to the preceding section → heading reads as belonging to that content
  • Action buttons grouped near the content they act on → clearly scoped to that content

How It Works in Layouts

  • Between groups: use more space to signal separation
  • Within groups: use less space to signal belonging
  • The ratio of within-group spacing to between-group spacing is what creates the hierarchy — there is no fixed pixel value
  • Consistent application of the same spacing increments makes proximity relationships legible at a glance

Common Applications

Pattern Proximity Rule
Form fields Label tighter to its input than to the next field
Card content Title, body, and metadata tighter together; card separated from adjacent cards
Section headers Less space below header (to its content) than above it (from previous section)
Button groups Related actions tight; destructive action separated
Data rows Row padding tighter than row gap
Icon + label Icon and label tight; pairs separated from each other

Relationship to Other Principles

  • Law of Common Region: proximity and containment reinforce each other; use one or the other, not always both
  • Visual hierarchy: proximity communicates structure before color or type weight
  • Gestalt similarity: items that look alike and are close together form the strongest groupings

Best Practices

  • Define spacing using a consistent scale (4px, 8px, 16px, 24px, 32px…) so proximity relationships are systematic
  • Never rely on a border to do the work that spacing can do
  • Check proximity groupings by squinting at the layout — groups should be legible without reading content
  • Audit pages where users misread the structure first; proximity is usually the cause