Spacing and radii
Use this page to pick a gap, a padding or a corner radius. Take every value from the scale. A value off the scale is almost always a mistake.
Spacing
Section titled “Spacing”Spacing tokens are named by their size in pixels, so --rp-space-16 is 16px.
- Use 4 and 8 inside a control, such as the gap between an icon and its label.
- Use 12 and 16 between related items and as padding inside cards.
- Use 24 and 32 between groups and sections.
- Use 48 and more for page margins and large breaks.
- 2 and 6 are for fine adjustments only.
Spacing does not change with the theme. A theme changes colours, fonts and radii, not the rhythm.
--rp-space-22px--rp-space-44px--rp-space-66px--rp-space-88px--rp-space-1212px--rp-space-1616px--rp-space-2424px--rp-space-3232px--rp-space-4848px--rp-space-6464px--rp-space-9696px
Radius tokens are named for the shape they belong to. Pick by shape, not by size.
controlis for buttons, inputs and other controls.pillis for chips and tags.cardis for cards and panels.plateis for large plates that hold cards.canvasis for the inset canvas inside the app frame.
A theme can change radii. Code that uses the named radius follows it.
--rp-radius-control10px--rp-radius-pill16px--rp-radius-card16px--rp-radius-plate22px--rp-radius-canvas24px