Skip to content
Saeede Agahi

Spacing and sizing

The 4px spacing scale and control sizes.

Spacing scale

Spacing uses a 4px grid. Use the token classes, for example p-ds-16 or gap-ds-8.

Spacing tokens
PreviewValueClass
0pxp-ds-0
4pxp-ds-4
8pxp-ds-8
12pxp-ds-12
16pxp-ds-16
20pxp-ds-20
24pxp-ds-24
32pxp-ds-32
40pxp-ds-40
48pxp-ds-48

Control sizes

Controls use control.height, not the sizes below directly, so they change with density. The smallest size, 24px, is the minimum target size.

Control size primitives
TokenValue
size.control.xs24px
size.control.sm28px
size.control.md32px
size.control.lg36px
size.control.xl40px

Guidance

Use 4 between an icon and its label in small controls and tags, and 8 in medium and large controls. Use 8 inside fields and small buttons, and between related items. Use 12 to 16 between form fields, 24 between groups, and 32 to 48 between page sections.