Law Of Common Region

by owl-listener9a6930cf84a8No license2.8K starsListed Oct 8, 2026Updated Oct 8, 2026Repository updated 4 weeks ago

Apply the Law of Common Region — a shared container, background, or border groups elements regardless of spacing. Use when grouping must survive a tight layout. For grouping by spacing alone, use `law-of-proximity`.

Instructions onlyDesign & Creative
AI-generated overview

Applies the Gestalt Law of Common Region to group UI elements using shared containers, backgrounds, or borders.

What it does
This skill guides an agent in applying the Gestalt Law of Common Region, where elements inside a shared boundary or background are perceived as a group. It explains the principle, contrasts it with the Law of Proximity in a comparison table, and lists applications such as cards, sidebars, modals, form sections, table rows, tag groups, and tooltips. It also covers when containment is counterproductive and gives best practices for consistent containers, minimal container strength, low-contrast or dark mode survival, and avoiding redundant grouping signals.
When to use it
Use it when grouping must remain clear in a tight layout or when a grouping boundary needs to be explicit, such as a card acted on as a unit or a form section inside a larger form. It is also relevant when deciding whether to add a container, background, or border rather than relying on spacing alone.
Requirements
No tools, packages, runtimes, credentials, or network access are required; it is instructions only and ships no scripts.

Law of Common Region

You are an expert in Gestalt visual organization and containment-based grouping.

What You Do

You apply the Law of Common Region to create clear groupings using visual boundaries — backgrounds, borders, cards, and surfaces — so users understand which elements belong together.

The Principle

Elements enclosed within a shared boundary or placed on a shared background are perceived as a group, even when they are not especially close together. Containment is one of the strongest grouping signals available:

  • A card with a background creates an unambiguous group
  • A colored section background ties disparate content into a unit
  • A panel border tells users that everything inside belongs together

Common Region vs Proximity

Both signal grouping; they work differently:

Law of ProximityLaw of Common Region
MechanismSpatial closenessShared boundary or background
Best forRelated items already closeItems that need a stronger or explicit boundary
OverheadZero — just spacingVisual weight — a border or background is present
When to preferMost layout groupingCards, panels, sidebars, tabbed sections, modals
Use proximity first; add common region when proximity alone is insufficient or when the grouping boundary needs to be explicit (e.g. a card that can be acted on as a unit, a form section within a larger form).

Applications

PatternCommon Region Role
CardsContainer clearly delimits a discrete item
SidebarBackground or border separates navigation from content
Modal / sheetSurface elevation signals an isolated task context
Form sectionsBackground or rule divides logical groups within a long form
Table rowsHover/selection background shows a row as a unit
Tag groupsPill background makes each tag a discrete object
TooltipContainer boundary distinguishes overlay from page content

When Containment Is Counterproductive

  • Using cards for everything flattens hierarchy — not every group needs a container
  • Nested common regions create visual noise; limit nesting depth to two levels
  • A border for its own sake adds clutter; if proximity already communicates the grouping, the border is redundant

Best Practices

  • Give containers consistent corner radius, padding, and shadow within a design system
  • Use the weakest container that gets the job done — background before border, border before card surface
  • Ensure common regions survive in low-contrast or dark mode contexts
  • Don't combine proximity and common region redundantly on the same grouping unless you are establishing hierarchy (a card inside a panel section, for example)

Source and attribution

Source:owl-listener/designer-skillsinui-design/skills/law-of-common-regionat commit9a6930c

License: No license

Content belongs to its original authors. SourceWeft indexes it from a public repository.

Report or request removal