Skip to main content Skip to footer

A Guide to the Law of Common Region in Web Development

Quick Start Guide
What You Will Need
Controls Referenced
Tutorial Concept Build a scannable settings-first UI with Wijmo: Accordion-based sections, consistent card boundaries, and progressive disclosure to reduce clutter, speed up comprehension, and prevent mis-clicks in dense web apps.

What Is the Law of Common Region?

The Law of Common Region says that elements placed within the same clearly defined area are perceived as belonging together, even if they aren't close to each other or visually similar.

In other words, if you draw a boundary (a card, panel, shaded area, section background, outline, etc.), users will assume everything inside that boundary shares a purpose. That's great when it's true and a mess when it isn't. The principle comes from Gestalt psychology, which describes how people naturally organize visual information into meaningful groups.

Law of Common Region UI Law of Common Region Sections

In this blog, we'll explore various design concepts of this law, including:

Ready to get started? Download Wijmo Today!

Applying the Law of Common Region in UI/UX

Use Containers to Communicate "These Belong Together"

Cards, panels, and section backgrounds aren't decoration; they have meaning. Use them to group:

  • Form fields that produce a single output (e.g., "Shipping Address")
  • Filters that affect one widget (e.g., "Filters for this grid")
  • Actions that belong to one object (e.g., "User actions" on a profile page)

If you've got controls that affect different things mixed in the same region, that's not "minimal", that's confusing.

Make Regions Do Real Work

A common mistake is creating box soup: adding borders to everything, nesting borders within borders, or adding random background blocks. If you highlight everything, nothing stands out.

Rules that keep you out of trouble:

  • Use one primary boundary style (e.g., card with a subtle shadow or a tinted background, not five styles).
  • Don't create a region unless the grouping is meaningful.
  • Keep region padding consistent so the boundary feels intentional, not accidental.

If your UI looks like a spreadsheet made of rectangles, you didn't apply the law; you drowned it.

Combine Common Region with Proximity and Alignment

Common Region is powerful, but it shouldn't fight your other signals.

  • Keep related items close inside the region.
  • Align labels/inputs consistently.
  • Don't place "outsider" elements visually near a region boundary unless they belong to it.

This principle is closely related to (and often reinforces) proximity; use both to make grouping undeniable.

Design Regions for Responsive Layouts

On wide screens, regions are obvious. On mobile, layouts collapse, and boundaries can blur.

  • Use background + padding for regions (still visible when stacked).
  • Ensure your boundary survives reflow (CSS Grid/Flex changes).
  • Keep section headings inside the region they describe (don't orphan headings above a boundary).

Responsive Layouts

Creating a Filter Panel Region for a Wijmo FlexGrid

Filters are a classic place where the Law of Common Region solves real problems: users should instantly know which controls affect which data views.

Wrap filter controls in a panel, then place the grid outside it:

JavaScript datagrid

import * as wjInput from '@mescius/wijmo.input';
import * as wjGrid from '@mescius/wijmo.grid';
import * as wjCore from '@mescius/wijmo';

// Common Region: all filters live inside one visual container (a panel/card in your HTML)
const countryFilter = new wjInput.ComboBox('#countryFilter', {
  itemsSource: ['All', 'United States', 'Japan', 'Germany', 'Brazil'],
  selectedIndex: 0
});

const statusFilter = new wjInput.ComboBox('#statusFilter', {
  itemsSource: ['All', 'Active', 'Paused', 'Closed'],
  selectedIndex: 0
});

const view = new wjCore.CollectionView(getData(), {
  filter: item => {
    const c = countryFilter.text;
    const s = statusFilter.text;
    return (c === 'All' || item.country === c) &&
           (s === 'All' || item.status === s);
  }
});

const grid = new wjGrid.FlexGrid('#theGrid', {
  autoGenerateColumns: false,
  columns: [
    { binding: 'name', header: 'Name' },
    { binding: 'country', header: 'Country' },
    { binding: 'status', header: 'Status' }
  ],
  itemsSource: view
});

[countryFilter, statusFilter].forEach(cb => {
  cb.selectedIndexChanged.addHandler(() => view.refresh());
});

function getData() {
  return [
    { name: 'Acme Co', country: 'United States', status: 'Active' },
    { name: 'Sakura Inc', country: 'Japan', status: 'Paused' },
    { name: 'Berg GmbH', country: 'Germany', status: 'Active' }
  ];
}

Building Dashboard Cards Around a Wijmo FlexChart

Dashboards fail when charts, KPIs, and controls float around with no structure. Common Region turns scattered visuals into readable sections.

Use FlexChart inside a card-like region (same boundary pattern across the dashboard):

JavaScript Chart

import * as wjChart from '@mescius/wijmo.chart';

new wjChart.FlexChart('#salesChart', {
  itemsSource: [
    { month: 'Jan', sales: 120 },
    { month: 'Feb', sales: 155 },
    { month: 'Mar', sales: 142 }
  ],
  bindingX: 'month',
  series: [{ name: 'Sales', binding: 'sales' }],
  chartType: 'Line'
});

If you keep the boundary style consistent (same padding, same header placement), users learn your layout once and then fly through the page.

Organizing Dense Settings Pages with Wijmo Accordion

Settings pages are where applying Common Region is basically mandatory. A long scroll of unrelated toggles is trash UX.

Wijmo's Accordion gives you explicit regions with headers (and optional collapse behavior) so users can focus on one category at a time.

JavaScript accordion control

import { Accordion } from '@mescius/wijmo.nav';

// Panes defined in your HTML; Accordion turns each into a clear region.
const acc = new Accordion('#settingsAccordion', {
  allowCollapseAll: true,
  isAnimated: true
});

This implements Common Region with a bonus: you're not just drawing boxes, you're also reducing scroll and keeping the page mentally navigable.

Conclusion

The Law of Common Region is simple: draw meaningful boundaries so users don't have to guess what belongs together.

Use this to:

  • Make forms readable
  • Make dashboards scannable
  • Make filters obvious
  • Make settings manageable

But don't overdo it. If everything is boxed, nothing is grouped, and your UI becomes noisy. Apply boundaries only where they communicate real structure, and your interface instantly feels more "designed" without adding complexity.

Ready to try it out? Download Wijmo Today!

Tags:

comments powered by Disqus