Lab / Design System

Semantic Scales

Interactive demo of the 8 mathematical spacing progressions: linear, fibonacci, golden ratio, modular, perfect fourth, augmented fourth, minor second, and major second.

This site uses a unified semantic scales system for spacing, border-radius, and animation duration. Each progression follows a different mathematical ratio, giving you distinct visual rhythms to choose from.

Use data-scale="..." on any container to switch progressions, or apply classes like .scale-phi or .scale-fib.

Mathematical Reference

See how each progression works mathematically. Select a scale to view its formula and step-by-step breakdown.

Scale Info

Formula: step × 0.25rem
Ratio: +0.25rem per step

Linear progression adds a constant amount at each step, creating evenly-spaced intervals.

Step Breakdown

StepValue× Basevs Prev

Ratio Calculator

Compare any two steps to see their mathematical relationship.

1rem × 1.618 = 1.618rem

At a Glance

Each progression distributes space differently. Dots show steps from smallest to largest.

Size Tokens

Spacing values from --size-3xs to --size-5xl

3xs
2xs
xs
sm
md
lg
xl
2xl
3xl
4xl
5xl

Radius Tokens

Border radius from --radius-xs to --radius-3xl

xs
sm
md
lg
xl
2xl
3xl

Duration Tokens

Animation timing from --duration-xs to --duration-3xl

xs
sm
md
lg
xl
2xl
3xl

Grid Gaps

Same 3×3 grid with different gap sizes using --size-*

xs
sm
md
lg

Padding & Margins

Content boxes showing inner padding at each step

xs
Content
sm
Content
md
Content
lg
Content
xl
Content

Inline Spacing

Horizontal gaps between elements (tags, buttons, icons)

xs
Tag Tag Tag
sm
Tag Tag Tag
md
Tag Tag Tag
lg
Tag Tag Tag

Stack Spacing

Vertical rhythm between content blocks

xs
sm
md
lg
xl

Card Component

Full component using scale tokens for padding, gaps, and radius

Card Header

This card uses --size-* for padding and gaps, --radius-* for corners, and --duration-* for hover transitions.

Compare All Scales

All 8 progressions side by side — same components, different rhythms

Grid Gaps --size-md

Linear
Fibonacci
Golden (φ)
Modular
Perfect 4th
Augmented
Minor 2nd
Major 2nd

Padding --size-md

Linear
Content
Fibonacci
Content
Golden (φ)
Content
Modular
Content
Perfect 4th
Content
Augmented
Content
Minor 2nd
Content
Major 2nd
Content

Tag Spacing --size-sm

Linear
A B C
Fibonacci
A B C
Golden (φ)
A B C
Modular
A B C
Perfect 4th
A B C
Augmented
A B C
Minor 2nd
A B C
Major 2nd
A B C

Stack --size-md

Linear
Fibonacci
Golden (φ)
Modular
Perfect 4th
Augmented
Minor 2nd
Major 2nd

Border Radius --radius-lg

Linear
Fibonacci
Golden (φ)
Modular
Perfect 4th
Augmented
Minor 2nd
Major 2nd

Mini Card

Linear
Title
Fibonacci
Title
Golden (φ)
Title
Modular
Title
Perfect 4th
Title
Augmented
Title
Minor 2nd
Title
Major 2nd
Title

Page Mockup

A realistic layout using the active scale. Switch scales above to see how spacing relationships change across the entire composition.

Featured Work

Design System Spacing

Consistent rhythm creates visual harmony. Notice how all spacing — from button padding to section gaps — maintains proportional relationships.

Recent Projects

Typography System

Modular scale for type hierarchy with consistent vertical rhythm.

Design Type

Color Palette

Accessible color system with semantic tokens and dark mode.

Color A11y

Component Library

Reusable UI components built on the design token foundation.

UI Code

Get in Touch

Form elements also follow the spacing scale for consistent rhythm.