Fibonacci scale Guide
VD3 UI's spacing, type, and radius scales follow the Fibonacci sequence (1, 2, 3, 5, 8, 13, 21…) instead of a linear 4/8px grid. Because each step is the sum of the two before it, sizes relate to one another the way they do in nature — rhythm that feels balanced without manual tuning. It's a design philosophy baked into the tokens themselves, not any one component.
What is the Fibonacci sequence?
Each number is the sum of the two before it:
As the numbers grow, the ratio between neighbours approaches ≈ 1.618 — the golden ratio (φ), the same proportion found in shells, sunflowers, and classical architecture. Our eyes read those proportions as balanced, which is why a φ-tuned scale feels right without fiddling.
Before / after: equal vs Fibonacci columns
Standard — equal columns
Balanced, but uniform — every section gets the same emphasis.
Fibonacci — 3 : 5 : 8
~19% + ~31% + ~50%. Natural hierarchy — the eye flows from small to large.
The spacing scale, to scale
Bar widths are a conceptual px demo of the sequence, not the rem values of --vd-space-fib-*.
Utilities & tokens
<!-- Helper utilities: vd-p-* / vd-mb-* use --vd-spacing-* (Fibonacci px steps). -->
<div class="vd-p-5">
<h2 class="vd-mb-3">Title</h2>
<p class="vd-mb-2">Body copy with harmonious rhythm.</p>
</div>
<!-- Primitives: data-pad / data-gap read --vd-space-fib-* (a separate rem scale). -->
<div class="vd-box" data-pad="fib-5">
<div class="vd-stack" data-gap="fib-3">…</div>
</div>:root {
/* Primitive / layout tokens (tokens.css) — not the helper vd-p-* scale */
--vd-space-fib-1: 0.125rem; /* 2px */
--vd-space-fib-2: 0.25rem; /* 4px */
--vd-space-fib-3: 0.375rem; /* 6px */
--vd-space-fib-5: 0.5rem; /* 8px */
--vd-space-fib-8: 0.75rem; /* 12px */
--vd-space-fib-13: 0.8125rem; /* 13px */
--vd-space-fib-21: 1.3125rem; /* 21px */
--vd-space-fib-34: 2.125rem; /* 34px */
--vd-space-fib-55: 3.4375rem; /* 55px */
}Fibonacci layout classes
Swap a single row class to get golden proportions — no custom CSS. Width rules only apply to children with vd-col-fib-*; put your styled content inside each column, as below:
4-column (1 : 2 : 3 : 5)
3-column (3 : 5 : 8)
| Class | Columns | Ratio | Use case |
|---|---|---|---|
vd-row-fib-3 | vd-col-fib-2 + vd-col-fib-3 + vd-col-fib-5 | 2 : 3 : 5 (20 / 30 / 50%) | Sidebar + secondary + main |
vd-row-fib-3-alt | vd-col-fib-3 + vd-col-fib-5 + vd-col-fib-8 | 3 : 5 : 8 (~19 / 31 / 50%) | More dramatic hierarchy |
vd-row-fib-4 | vd-col-fib-1 + vd-col-fib-2 + vd-col-fib-3 + vd-col-fib-5 | 1 : 2 : 3 : 5 (~9 / 18 / 27 / 45%) | Four columns with strong visual flow |
How to reach for each step
| Steps | Typical use |
|---|---|
1, 2, 3 | Fine adjustments — borders, tight gaps |
5, 8 | Component padding, gaps between elements |
13, 21 | Section spacing, card padding |
34, 55, 89 | Page rhythm, hero spacing |
Why not a linear scale?
A linear 4/8/12/16 scale gives every step the same visual jump, which flattens hierarchy. A Fibonacci scale grows proportionally, so small and large spaces stay distinct and the eye reads structure faster.
Want the proportions in layout form? The Golden ratio page has an interactive φ slider and grid demos.
Fibonacci in Motion & Animation
The same harmonic principle governs VD3 UI's animation system. Rather than arbitrary 200ms or 300ms timings, durations step through literal Fibonacci millisecond values:
| Duration | Token | Role in Design System |
|---|---|---|
55ms | --vd-duration-instant | Active states, tap feedback, button presses |
89ms | --vd-duration-fast | Toggles, checkmarks, reduced-motion crossfades |
144ms | --vd-duration-snappy | Tooltips, small badges, micro-unfolds (< 80px) |
233ms | --vd-duration-normal | Dropdowns, popovers, select menus, chip dismiss |
377ms | --vd-duration-moderate | Drawers, modals, offcanvas, alerts (< 450px) |
610ms | --vd-duration-slow | Accordions, code snippets, large panels (> 450px) |
987ms | --vd-duration-gentle | Page transitions, hero unfolds, choreographies |
Learn more about adaptive height calculations and golden easing curves on the Motion foundation page.