Design BetterDesign System
spacing.*

Spacing & Layout

All spacing is derived from a 4px base. Use the named tokens — never hard-code pixel values.

Spacing scale

spacing.0
0px
zero
spacing.1
4px
spacing.2
8px
spacing.3
12px
spacing.4
16px
spacing.6
24px
spacing.8
32px
spacing.12
48px
spacing.16
64px
spacing.24
96px
spacing.32
128px

Border radius

borderRadius.none
None
0px
Hard edges. Tables, code blocks.
borderRadius.sm
Small
4px
Chips, badges, tight inline elements.
borderRadius.md
Medium
8px
Inputs, buttons, small cards.
borderRadius.lg
Large
12px
Cards, panels, popovers.
borderRadius.xl
XL
16px
Large cards, modals, feature blocks.
borderRadius.pill
Pill
9999px
CTAs, content-type badges, tags.

Elevation shadows

Level 1
--shadow-1
Cards, panels
Level 2
--shadow-2
Dropdowns, popovers
Level 3
--shadow-3
Modals, dialogs

Layout grid

Design Better layouts use a 12-column grid with 24px gutters at desktop (1280px+ canvas) and an 8-column grid with 16px gutters at tablet (768–1280px). Mobile uses a single column with 20px horizontal padding. Maximum content width is 1200px, centered.

DESKTOP · 1280px+ · 12 columns · 24px gutter · 24px margin
24px
24
24
24
24
24
24
24
24
24
24
24
24px
1
2
3
4
5
6
7
8
9
10
11
12
Column
Margin (24px)
Gutter (24px)
TABLET · 768–1280px · 8 columns · 16px gutter · 16px margin
1
2
3
4
5
6
7
8
MOBILE · <768px · 1 column · 20px margin
1 column
Desktop1280px+12 colgutter 24pxmargin 24pxmax-width 1200px
Tablet768–1280px8 colgutter 16pxmargin 16pxmax-width
Mobile<768px1 colgutter margin 20pxmax-width