Skip to content

Spacing

Current spacing uses Tailwind’s default scale (4 = 1rem / 16px). Values below are implementation defaults, not yet formalized as Davinci tokens — they will be aliased in the Tokens phase.

Introduction#

Spacing creates rhythm. DavinciUI currently relies on Tailwind’s numeric scale. Use the scale consistently: small values for related elements, larger values for section separation. Avoid one-off arbitrary values.

Spacing Scale#

Visual ruler — larger value, larger gap. All values are multiples of 4.

20.5rem
41rem
61.5rem
82rem
123rem
164rem
205rem
246rem
328rem
4010rem
4812rem
6416rem

CSS: 1rem = 16px · gap-4 = 1rem

Visual Scale#

2
4
8
12
16
24
32

8 → 12 → 16 → 24 progression for section rhythm

Padding#

p-4 (16px)

p-6 (24px)

px-4 py-8

Margin#

Stack with mt-8 / mb-12

mt-8 (32px)
mb-12 (48px)

Gap#

Flex gap-4

Grid gap-6

Common Usage#

gap-4 — card grids, stacks

p-6 — card padding

px-4 py-8 — section padding

space-y-6 — form stacks

mt-8 — section separation

Guidelines#

  • Use smaller spacing (2–4) for related elements, larger (8–16–24) between groups.
  • Keep rhythm — prefer 4/8/12/16/24 for layouts, 2/3 for tight inline.
  • Avoid arbitrary values like p-[13px] — use the scale.
  • Consistent gap is more important than inventing a new token now.