Law of proximity

From Infrasity-Labs/dev-gtm-claude-skills · View interactive version

Law of proximity is an AI agent skill from the GitHub repository Infrasity-Labs/dev-gtm-claude-skills. Apply the Law of Proximity to group related elements through spatial relationships.

How to use this skill

Skill file

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:

How It Works in Layouts

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

Best Practices

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.