Coop Design System

Spacing

This is a token-based 4px spacing scale that ensures consistent spacing in components and layouts.

Spacing cover

Spacing philosophy

Every spacing value is a multiple of the 4 px base unit, so all spacing decisions align to the same grid without counting pixels. The visual rhythm, or consistency, make interfaces easier to scan, read, and navigate.

The scale below is a guide, not a script. Think of spacing as a design decision based on hierarchy, consistency, and content. Choose the value that best fits your context, and adjust as needed to keep the layout clear and easy to scan – even if that means stepping outside the scale.

Spacing scale

TokenValueIntended use
spacing.none0Explicitly no spacing (overrides, resets)
spacing.3xsmall2pxHairline gaps, badge padding
spacing.2xsmall4pxTight internal spacing within compact components
spacing.xsmall8pxComponent internal padding at small scale
spacing.small12pxStandard component padding and small gaps
spacing.medium16pxDefault gap between related elements
spacing.large24pxSection separation within a view
spacing.xlarge40pxMajor section gaps and layout padding
spacing.2xlarge48pxPage-level sections
spacing.3xlarge56pxLarge layout gaps, generous section breathing room
spacing.4xlarge64pxHero spacing, top-of-page vertical rhythm

On this page