MCPInstall

law-of-proximity

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.

Installs
1.8K
Last 24h
+22
Trending rank
#5596
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/owl-listener/designer-skills --skill law-of-proximity
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads law-of-proximity automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

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

PatternProximity Rule
Form fieldsLabel tighter to its input than to the next field
Card contentTitle, body, and metadata tighter together; card separated from adjacent cards
Section headersLess space below header (to its content) than above it (from previous section)
Button groupsRelated actions tight; destructive action separated
Data rowsRow padding tighter than row gap
Icon + labelIcon 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

FAQ

What does the law-of-proximity skill do?

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.

How do I install law-of-proximity?

Run npx skills add https://github.com/owl-listener/designer-skills --skill law-of-proximity in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/law-of-proximity/ (personal) or .claude/skills/law-of-proximity/ (project).

Which AI agents can use law-of-proximity?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is law-of-proximity safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains law-of-proximity?

It is published by owl-listener in owl-listener/designer-skills. It has 1,776 recorded installs.

More from owl-listener/designer-skills

View all →

presentation-deck

owl-listener/designer-skills

Structure a design presentation for a specific audience and decision. Use when presenting internally. For a portfolio narrative use case-study; for the written argument use design-rationale.

Docs & Writing3.1K installs

typography-scale

owl-listener/designer-skills

Create a modular type scale with size, weight, and line-height relationships. Use when establishing typographic structure. For line length only use readable-measure; for judging type on an existing screen use critique-typography (visual-critique).

Frontend & Design2.6K installs

illustration-style

owl-listener/designer-skills

Define an illustration style guide — visual language, colour usage, and application rules. Use when commissioning or standardising illustration. For icons, use icon-system (design-systems).

Media & Creative2.6K installs

visual-hierarchy

owl-listener/designer-skills

Establish hierarchy through size, weight, colour, spacing, and position so the eye lands in the intended order. Use when composing new work. For judging an existing screen, use critique-visual-hierarchy (visual-critique).

Frontend & Design2.5K installs

color-system

owl-listener/designer-skills

Build a product colour system — tonal scales, semantic roles, and contrast compliance. Use when defining or rebuilding colour from scratch. For dark-mode adaptation use dark-mode-design; for chart palettes use data-visualization; for multi-brand token architecture use theming-system (design-systems).

Frontend & Design2.5K installs

dark-mode-design

owl-listener/designer-skills

Adapt an existing palette to dark mode — surface elevation, contrast rebalancing, and desaturation rules. Use when you already have a light palette to translate. For building the base palette first, use color-system.

Frontend & Design2.5K installs

Popular frontend & design skills

View category →

setup-matt-pocock-skills

mattpocock/skills

Configure this repo for the engineering skills: set up its issue tracker, triage label vocabulary, and domain doc layout. Run once before first use of the other engineering skills.

Frontend & Design1.1M installs

frontend-design

anthropics/skills

Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.

OfficialFrontend & Design1M installs

hyperframes-animation

heygen-com/hyperframes

All animation knowledge for HyperFrames — atomic motion rules, multi-phase scene blueprints, scene transitions, broader motion-design techniques, AND the seven runtime adapters (GSAP default, plus Lottie, Three.js, Anime.js, CSS keyframes, Web Animations API, TypeGPU). Use for any motion or animation task: pick 2-4 rules and compose, or load a blueprint, or look up runtime-specific API (e.g. GSAP eases / Lottie player / Three.js mixer). Also covers auditing an existing composition's choreography (animation map) and 24 named text-animation effects. HyperFrames-native: single paused timeline, seek-safe, deterministic.

prototype

mattpocock/skills

Build a throwaway prototype to answer a design question. Use when the user wants to sanity-check whether a state model or logic feels right, or explore what a UI should look like.

Frontend & Design999.2K installs

hyperframes-core

heygen-com/hyperframes

The HyperFrames composition contract — build one renderable project. Use for composition structure, the data- timing attributes, class="clip", tracks, sub-compositions, variables, framework-owned media playback, deterministic-render rules, and validation. Read before writing composition HTML.

Frontend & Design930.5K installs

vercel-react-best-practices

vercel-labs/agent-skills

React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.

OfficialFrontend & Design843.1K installs