Spacing utilities

SGDS spacing utilities for applying margin and padding values in code.

Spacing utilities

Spacing utilities apply the SGDS spacing scale directly in code. Use them for margin, padding, axis-specific spacing, and one-off layout adjustments.

MultiplierSGDS tailwind tokenValue1
sgds:m-1
4 px
2
sgds:m-2
8 px
3
sgds:m-3
12 px
4
sgds:m-4
16 px
5
sgds:m-5
20 px
6
sgds:m-6
24 px
8
sgds:m-8
32 px
12
sgds:m-12
48 px
16
sgds:m-16
64 px
24
sgds:m-24
96 px

Best practices

  • Use a consistent scale: stick to named utilities rather than arbitrary values.
  • Layer spacing: combine axis-specific utilities for semantic meaning.
  • Maintain vertical rhythm: use sgds:my-* to keep vertical spacing consistent.
  • Use component padding: apply sgds:p-* for internal component spacing.
  • Set layout margins: use sgds:m-*, sgds:mx-*, and sgds:my-* for component spacing.

Singapore Government Design System

The Singapore Government Design System was developed to empower teams in creating fast, accessible and mobile-friendly digital services.