Module 02 · Beginner to Intermediate

Spacing and Rhythm

Overview

Spacing and rhythm is the consistent use of a fixed spacing scale (Template Interface's own theme uses a 4px based scale, see docs/DESIGN.md section 2.3) between elements, so vertical spacing reads as intentional rather than eyeballed.

Why It Matters

Uneven whitespace reads as sloppy even when the colors and type on a page are otherwise correct, because inconsistent spacing is the first thing a viewer's eye notices, even before they consciously register why something looks off.

Core Principles

  • Pick a scale, then only use values from it. A fixed set of spacing values (4, 8, 12, 16, 24px, and so on) is easier to apply consistently than a free choice every time.
  • Vertical rhythm compounds across a whole page. One inconsistent gap is barely noticeable; a page full of them reads as unplanned.
  • Proximity groups related elements. Items placed close together are read as one group; the same items spread apart are read as unrelated, even if their content did not change at all.

Interactive Demo

Interactive Demo
Section heading
First item in the list
Second item in the list
Third item in the list

Consistent scale: every gap is the same --space-4 (16px) value, so the list reads as one evenly spaced group.

Common Mistakes

  • Adjusting spacing by eye per section instead of pulling from a fixed scale, which drifts across a long page.
  • Adding margin on a child element that is already inside a container using CSS gap, which doubles the intended space; see the responsive audit guidance in docs/DESIGN.md section 8.2.
  • Compressing spacing to fit more content instead of shortening the content, which makes a page feel cramped rather than dense.

Used In Templates

Demonstrated directly in the Portfolio Site, Blog and Article Site, E-commerce Storefront, Real Estate Listing Site, and Personal Resume and CV Site templates; see docs/PRD.md section 13.2.

Summary

Consistent spacing, pulled from a fixed scale rather than eyeballed per section, is what makes a page's rhythm feel intentional. Proximity, grouping related items closer together than unrelated ones, is the same principle applied to what spacing communicates, not just how much of it there is.