Skip to content

Spacing ​

Spacing is the distance around and between component and layout elements

Overview · Applying spacing · Tokens

Note

The spacing system tokens are only used on Jetpack Compose.

System spacing tokens ​

Design tokens

Token table

Machine-readable relationship table

Measurement tokens · 1 token set · 18 tokens · live token table · DSDB MEASUREMENT.20543ce18892f7d9

  • Default context: none
  • Not configurable here (group default used): Theme: Light · Platform: Android · Audience: 1P Baseline · Motion scheme: Standard · Font: Static · Contrast: Default · iOS dark theme elevation: None · iOS weight setting: Default · Language height: Small
  • Reference chain: aliases from the token to its source value (token → alias → … → value). "—" means the token holds a literal value.

Spacing · md.sys.measurement · 18 tokens

For common spacing units that can be applied to components and layouts.

GroupTokenTypeReference chainResolved value
All tokensmd.sys.measurement.space0Length—0dp
All tokensmd.sys.measurement.space25Length—2dp
All tokensmd.sys.measurement.space50Length—4dp
All tokensmd.sys.measurement.space75Length—6dp
All tokensmd.sys.measurement.space100Length—8dp
All tokensmd.sys.measurement.space125Length—10dp
All tokensmd.sys.measurement.space150Length—12dp
All tokensmd.sys.measurement.space175Length—14dp
All tokensmd.sys.measurement.space200Length—16dp
All tokensmd.sys.measurement.space250Length—20dp
All tokensmd.sys.measurement.space300Length—24dp
All tokensmd.sys.measurement.space400Length—32dp
All tokensmd.sys.measurement.space450Length—36dp
All tokensmd.sys.measurement.space500Length—40dp
All tokensmd.sys.measurement.space600Length—48dp
All tokensmd.sys.measurement.space700Length—56dp
All tokensmd.sys.measurement.space800Length—64dp
All tokensmd.sys.measurement.space900Length—72dp

System spacing tokens are a linear range of spacing values recommended by Material. They’re intended to cover the majority of spacing needs within the design system. The base unit of measurement md.sys.measurement.space100 is 8dp. Learn more about design tokens

The spacing system tokens, built from 8dp (1x). The range covers 0x to 9x.

The main spacing units are multiples of 8dp

Nested units ​

Values other than multiples of 8 are also used in layouts and Material components, like 2dp, 4dp, 6dp, and 10dp. Material only defines the most recommended nested units.

The spacing system defines tokens for 0.25x, 0.5x, 0.75x. 1.25x nested units.

Material only defines nested units that are actively used in common layouts or Material components

Component spacing ​

Most Material component spacing attributes will map to system spacing tokens. Spacing logic, like adaptive design or density, should be applied to the component attribute.

Component attributes follow a new naming strategy:

  • Going forward, all component spacing attributes will use padding, margin, and gap, and positional language: horizontal, vertical, leading, trailing, top, and bottom

    • Example: “Medium button: leading padding”
  • Past component spacing tokens use “space” to describe all padding, gaps, and margins, like leading-space, trailing-space, top-space, bottom-space, and between-space.

    • Example: “Medium button: leading space”

Unofficial offline mirror. Content © Google, licensed under CC BY 4.0.