Spacing

Spacing

Spacing is the set of distances between and inside elements. In the example, the crowded cards touch each other, while the balanced cards have an even gap between them.

Consistent spacing makes a layout feel organized and shows which elements belong together. Most teams pick a small set of spacing values and reuse them everywhere.

Spacing works at two levels:

  • Layout spacing: the larger gaps between major regions, such as a header, sidebar and content.
  • Component spacing: the smaller gaps inside a component, such as between a button’s icon and label.