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
gap-2 / p-2
41rem
gap-4 / p-4
61.5rem
gap-6 / p-6
82rem
gap-8 / p-8
123rem
gap-12
164rem
gap-16
205rem
gap-20
246rem
gap-24
328rem
gap-32
4010rem
gap-40
4812rem
gap-48
6416rem
gap-64
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.

