UI/UX laws

Laws of UX

32 research-backed principles behind ui-element-best-practices. Every rule cites a mechanism, not a preference. Each law below gets a plain-language definition and a live without/with example you can compare directly.

Built with this site’s own design tokens.

Interaction & Speed

Interaction & Speed

How fast and effortless a single action feels.

Memory & Attention

Memory & Attention

What people notice, hold onto, and recall later.

Perception & Gestalt

Perception & Gestalt

How people group, simplify, and judge what they see.

01

Law of Prägnanz

People perceive and interpret ambiguous or complex shapes in the simplest form possible.

02

Law of Proximity

Objects near each other are perceived as more related than objects farther apart.

03

Law of Common Region

Elements that share a clearly defined boundary (a border, background, or container) are perceived as belonging to the same group.

04

Law of Similarity

Elements that look visually similar are perceived as related or performing the same function, even when they aren't near each other.

05

Law of Uniform Connectedness

Elements visually connected by a line, arrow, or shared connector are perceived as more related than elements that are simply close together or similarly styled.

06

Von Restorff Effect

When several similar items are present, the one that differs from the rest is the one most likely to be remembered.

07

Aesthetic-Usability Effect

People perceive more aesthetically pleasing designs as easier to use, whether or not they actually are.

08

Hierarchy Through Contrast

Visual hierarchy comes from contrast in weight and colour, not from escalating font size: a heading and its body text can share the same size as long as weight and colour set them apart.

09

Tabular Numerals

Numeric values in a table should be right-aligned and set in tabular (fixed-width) figures, so every digit column, including the decimal point, lines up vertically from row to row.

10

Subgrid Alignment

When cards in a grid hold content of different lengths, each card should align its title, body, and actions to a shared set of row tracks owned by the parent grid, using CSS subgrid, instead of letting every card size its own rows from its own content.

11

Scrollbar Continuity

A scrollable panel's scrollbar should be restyled thin and on-brand, and left visible, rather than left as the operating system's bulky default or hidden away entirely.

12

60-30-10 Rule

Split a screen's colour into three roles by proportion: roughly 60% a single neutral for backgrounds and most surfaces, 30% a muted secondary tone for supporting panels and structure, and only 10% a single saturated accent, reserved for the one action or state that should win the eye's first pass.

13

Match Highlighting

In a filtered or autocomplete list, highlight the exact substring of each label that matched the query, styled with the product's own accent rather than the browser's default yellow, and give the active row its own separate highlight, whichever one arrow keys or the mouse currently point at, so Enter or a click always finishes the value on the row the user can see is active.

14

Deterministic Avatar Colour

Most users never upload a profile photo, so the fallback — initials over a background colour — is what people actually see. That colour has to be derived deterministically from something stable about the person (their id or name), never picked at random and never the same flat neutral for every user, and never a value chosen once and stored in the database.

15

Input Affixes

A prefix or suffix attached to an input (a currency symbol, a fixed protocol string, a unit) is part of that field, not a label sitting beside it, so the border, background, and focus ring belong to the wrapper around all three pieces, never to the inner <input> alone.

Motivation & Complexity

Motivation & Complexity

What keeps people moving toward a goal, and who pays for complexity.

Source

Where this comes from

These laws back the ui-element-best-practices skill, which reviews individual components (buttons, forms, navigation, modals, cards, tables, states, notifications, and tooltips) against them. Pair it with ui-ux-best-practices for full-screen review.

UI & Component Design skills