Spacing

Padding for the space inside a component, gap for the space between children — all from one numeric scale. Switch platform in the bar below for units.

Padding and gap tokens. Gap also has a matching negative ramp for overlaps.

Padding

Inner padding steps set the space inside a component. Use them to keep content comfortably inset and aligned across layouts.

spacingPaddingNone
0pt
scale.positive.0
spacingPaddingXs
2pt
scale.positive.50
spacingPaddingSm
4pt
scale.positive.100
spacingPaddingMd
8pt
scale.positive.200
spacingPaddingLg
12pt
scale.positive.300
spacingPaddingXl
16pt
scale.positive.400
spacingPadding2xl
24pt
scale.positive.600
spacingPadding3xl
32pt
scale.positive.800
spacingPadding4xl
40pt
scale.positive.1000
spacingPadding5xl
56pt
scale.positive.1400

Gap

Sets the space between child elements in a stacked or inline layout.

spacingGapPositiveNone
0pt
scale.positive.0
spacingGapPositive2xs
2pt
scale.positive.50
spacingGapPositiveXs
4pt
scale.positive.100
spacingGapPositiveSm
6pt
scale.positive.150
spacingGapPositiveMd
8pt
scale.positive.200
spacingGapPositiveLg
10pt
scale.positive.250
spacingGapPositiveXl
12pt
scale.positive.300
spacingGapPositive2xl
16pt
scale.positive.400
spacingGapPositive3xl
24pt
scale.positive.600
spacingGapPositive4xl
32pt
scale.positive.800

Gap · Negative

Use negative gaps to make items overlap. Use them when a layout needs layered or tucked-together elements.

spacingGapNegative2xs
-2pt
scale.negative.50
spacingGapNegativeXs
-4pt
scale.negative.100
spacingGapNegativeSm
-6pt
scale.negative.150
spacingGapNegativeMd
-8pt
scale.negative.200
spacingGapNegativeLg
-12pt
scale.negative.300
spacingGapNegativeXl
-16pt
scale.negative.400

All spacing comes from one numeric scale. Use padding for the space inside a component (between its edge and its content) and gap for the space between stacked or inline children. Never hardcode an off-scale value.

Padding — used for

Inner padding sets how tightly content sits inside a container. Smaller steps feel compact; larger steps feel open.

TokenValueUsed for
spacingPaddingNone0ptZero inset — flush surfaces and dividers.
spacingPaddingXs2ptTight inline badges, tags, and icon containers.
spacingPaddingSm4ptCompact chips, small button labels, and dense list rows.
spacingPaddingMd8ptDefault control padding — buttons, inputs, and list cell insets.
spacingPaddingLg12ptCards and grouped sections with comfortable breathing room.
spacingPaddingXl16ptRoomy panels, modals, and highlighted callouts.
spacingPadding2xl24ptLarge content blocks and hero section insets.
spacingPadding3xl32ptPage-level horizontal gutters and generous hero zones.
spacingPadding4xl40ptExtra-spacious screen-edge insets on tablet / large breakpoints.
spacingPadding5xl56ptMaximum structural whitespace — top-of-screen hero offsets.

Gap — used for

Gap drives the space between siblings in a flex or grid container. Use the same scale as padding so rhythm stays consistent throughout the layout.

TokenValueUsed for
spacingGapPositiveNone0ptNo gap — items flush together (use padding inside each instead).
spacingGapPositive2xs2ptHairline separation between tightly coupled elements, like an icon and its adjacent glyph.
spacingGapPositiveXs4ptTightly packed icon + label pairs and badge stacks.
spacingGapPositiveSm6ptForm field labels above their inputs; related metadata rows.
spacingGapPositiveMd8ptDefault stacked row spacing in lists and vertical forms.
spacingGapPositiveLg10ptSection-level spacing between distinct content groups.
spacingGapPositiveXl12ptLarger editorial or card-grid column gutters.
spacingGapPositive2xl16ptWide horizontal spacing in grid layouts.
spacingGapPositive3xl24ptStructural top-level section separation.
spacingGapPositive4xl32ptGenerous separation between major page regions and stacked sections.

Applied

The same scale in practice — an inner-padded card and a gap-separated list.

Continue
Card inner padding spacingPaddingLg
Checking ····8203
Savings ····4401
Boost Account
Stacked rows gap spacingGapPositiveMd

Anatomy

A single card illustrating where padding and gap live: padding wraps the card’s content inward; gap separates the title from the body text within.

Card title
Outer padding spacingPaddingLg · inner gap spacingGapPositiveSm

Do & Don’t

Row one
Row two
Row three
✓ DoUse a consistent scale step (spacingGapPositiveMd) between every row — rhythm feels uniform.
Row 1 7px
Row 2 13px
Row 3 21px
✗ Don’tHardcode arbitrary gaps (7 px, 13 px, 21 px) — rhythm breaks and maintenance becomes unpredictable.