Space
Space is what makes a screen easy to read. It groups what belongs together, separates what doesn’t, and gives a page its pace. Thread spaces every layout from one scale, shared by Macy’s and Bloomingdale’s, for web and app.
The scale
Space sets the rhythm of every layout: the padding inside a container and the gaps between the things in it. Every value is a named step, so a layout is built from decisions the whole system shares, never from a number picked on the spot. Both houses use the same scale.
Anatomy
A product card, drawn to scale, with the three kinds of space that shape it.
- 1Inset is the padding inside a container, here td.space.xl, 20px on every side.
- 2Stack is the gap between items placed one above the other, here td.space.md, 12px under the image.
- 3Inline is the gap between items placed side by side, here td.space.xs, 8px between the buttons.
Steps
Thirteen steps, from none to 56px, used for padding and gaps alike. Small steps sit close together, for the fine adjustments inside a component; larger steps spread out, for the rhythm of a page.
none0px3xs4px2xs6pxxs8pxsm10pxmd12pxlg16pxxl20px2xl24px3xl32px4xl40px5xl48px6xl56px
3xs to md
Inside a component
Between an icon and its label, inside a chip, between the lines of a price.
lg to 2xl
Between components
Padding inside cards and sheets, gaps between controls and items in a list.
3xl to 6xl
Between sections
The rhythm of a page: between a module and the next, around a hero.
Density
Space forks by density. Compact is for dense screens, such as the tools our colleagues use in stores, and a component takes its values from the density of the container it sits in. Today Compact carries the same values as Comfortable; the mode is in place so screens can tighten later without a single component rebinding.
How to use
Each pair shows the practice and the mistake it guards against.
Tokens
Every step, as it is named in the Tokens library.
| Token | Comfortable | Compact |
|---|---|---|
td.space.none | 0px | 0px |
td.space.3xs | 4px | 4px |
td.space.2xs | 6px | 6px |
td.space.xs | 8px | 8px |
td.space.sm | 10px | 10px |
td.space.md | 12px | 12px |
td.space.lg | 16px | 16px |
td.space.xl | 20px | 20px |
td.space.2xl | 24px | 24px |
td.space.3xl | 32px | 32px |
td.space.4xl | 40px | 40px |
td.space.5xl | 48px | 48px |
td.space.6xl | 56px | 56px |