Layout spacing

Layout spacing defines the relationships between the components, patterns, and regions that make up a product UI.
Faint, ghosted wireframe of a dashboard-style UI layout with a top navigation bar, a tall left sidebar panel, three smaller square panels, and a wide content area below, overlaid on a soft purple-to-peach gradient background.

How it works

Layout spacing governs object relationships, such as the spacing between components, patterns, and regions of a UI. It’s implemented through global tokens, which follow a geometric progression with values that round to familiar numbers: 2, 4, 8, 16. If you're used to an 8 px grid, these will feel recognizable. The scale provides consistent perceptual difference between adjacent values across its full range.

Scale of gray squares increasing in size from left to right, labeled with values 1, 2, 4, 6, 8, 12, 16, 20, 24, 32, 40, 48, 56, 64, 80, and 96, with a dotted diagonal line showing the growth curve.

Applying layout spacing

Global tokens govern object relationships in a layout. They create and distinguish the relationships between the components that make up a product UI. Smaller values create tighter relationships. Larger values create more visual independence. The choice should reflect the actual relationship between the objects being spaced.

Screenshot of the Adobe GenStudio interface showing a top navigation bar with a search field, a green table icon with a loading placeholder bar, and a floating toolbar with icons for image approval, comment, "Cr," and a highlighted gold icon; two callouts label the horizontal bands as "spacing-100" and "spacing-250."

Why not a fixed grid?

A common approach to spacing is to pick a base unit and build all spacing values from its multiples, such as 8, 16, 24, 32. These values are familiar and easy to remember, which is part of their appeal. This approach is called a linear progression.

Linear progressions like this work well in many situations, but have two limitations. First, spacing needs to grow with the elements around it. A 4 px gap between an icon and label looks right in a small component, but as the component scales up, the nearest grid values (4 px or 8 px) no longer fit the relationship correctly. Second, linear scales lose differentiation at larger values. The difference between 4 px and 8 px is obvious. The difference between 72 px and 80 px is almost imperceptible.

Scale of gray squares increasing in size from left to right beneath a pink upward curve, with a bracket over the first two squares labeled "100% increase" and a bracket over the last two squares labeled "11% increase," illustrating a decelerating growth rate.
Both of these limitations come down to the same underlying cause: human perception doesn't measure space in fixed increments. Spectrum's spacing system is built around geometric progressions and semantic tokens to address this directly. The next page explains how.

Tokens

Use global tokens for layout spacing.

Token
Value
spacing-25
1px
spacing-50
2px
spacing-75
4px
spacing-85
6px
spacing-100
8px
spacing-200
12px
spacing-300
16px
spacing-350
20px
spacing-400
24px
spacing-500
32px
spacing-600
40px
spacing-700
48px
spacing-750
56px
spacing-800
64px
spacing-900
80px
spacing-1000
96px