Skip to content
Design System
GitHub

Spacing

Everything sits on a 4 px base and uses six steps. Fewer choices make layouts consistent across teams, and CI rejects any other value in shipped components.

Scale

Tailwind's 4 px unit, restricted to 1, 2, 3, 4, 6 and 8.

1 · 4pxText to text: a title to its line below, a value to its unit, inside a 24 px tag
2 · 8pxIcon to label at every size, inside trays, between buttons, field label to input
3 · 12pxList row gaps, input side padding
4 · 16pxCard padding, between related groups
6 · 24pxDialog padding, between sections in a card
8 · 32pxBetween page sections

Inside out

Padding grows as containers grow. The tray uses 8 inside and 8 between, so its parts read as one object.

Emergency stop
Now
Events
padding 8 · gap 8 · radius 24 = 16 + 8

Component heights

Heights are tokens too. Anything interactive is at least 44 px on touch; 36 (--h-sm) with a mouse only. 56 is reserved for list rows and the emergency stop.

24tag
36sm
44md
48lg
56row
56stop
  • --h-tag
    Utility
    h-(--h-tag)
    px
    24
    Use
    tag, not interactive
  • --h-sm
    Utility
    h-(--h-sm)
    px
    36
    Use
    compact control: only where nothing is a touch screen. On touch it is 44, see below.
  • --h-md
    Utility
    h-(--h-md)
    px
    44
    Use
    default, minimum height of anything interactive
  • --h-lg
    Utility
    h-(--h-lg)
    px
    48
    Use
    page primary action, dock tabs
  • --h-row
    Utility
    h-(--h-row)
    px
    56
    Use
    list row
  • --h-stop
    Utility
    h-(--h-stop)
    px
    56
    Use
    emergency stop only

Page sections

Marketing pages need more air between sections than product UI. Two layout tokens cover that; never use them inside components.

  • --space-section
    Utility
    py-(--space-section)
    px
    96
    Use
    Between sections on marketing pages
  • --space-section-sm
    Utility
    py-(--space-section-sm)
    px
    64
    Use
    Between sections on phones

Rules

Wi-FiGood signal
padding 16 · gap 8 · bar 8 below
Do. Use the scale: 16 card padding, 8 between related lines.
Wi-FiGood signal
padding 13 · gap 5 · bar 11 below
Don't. Eyeball values like 13, 5 or 11. They drift between screens and teams. npm run lint:tokens rejects them.