Spacing scale

Every space in Prism comes from one scale built on a 4px base unit. The number in the token name grows with its value: spacing.100 is 4px and spacing.400 is 16px. spacing.50 is a 2px half-step for the tightest spots.

The spacing scale as true-size squares, from spacing.50 (2px) to spacing.1000 (40px)

How spacing is used

Pick a step by what the space does, not by how it looks. Small steps hold a component together, medium steps give content room, and the same scale sets the size of components and icons.

Inside components

Padding and gaps within a single component: around a button’s label, between an icon and its text, inside a badge. Not for layout. These steps are too tight to separate blocks of content.

spacing.50 – spacing.300
A button and a badge with redlines: spacing.200 padding on the sides and a spacing.100 gap between icon and label

Around content

Padding inside containers and gaps between content blocks: card headers and bodies, the first and last table columns, list items, drawer footers. Not for component internals. At this size, the parts of a single control drift apart.

spacing.300 – spacing.500
A card with redlines: spacing.300 above and below the header, spacing.400 on the sides and around the body

Component sizes

Heights and icon sizes come from the same scale, so components line up with the space around them. Buttons, inputs, and selects are 32px by default and 24px small; large buttons are 40px. Icons are usually 12px to 24px. Sizes, not spacing. These steps mostly set dimensions; for padding, reach for the smaller steps first.

spacing.300 – spacing.1000
Icons at spacing.300, spacing.400, spacing.500, and spacing.600, and small, medium, and large buttons at spacing.600, spacing.800, and spacing.1000 heights

Tokens

Every spacing token, with its value and where Prism components use it. Use the CSS variable in code. The token name is what you’ll find in Figma.

CSS variableFigma tokenValueCommon uses
--prism-spacing-0spacing.00Explicit reset
--prism-spacing-50spacing.502pxBadge and input padding, border widths, focus outline offset
--prism-spacing-100spacing.1004pxGap between icon and label, tight padding in selects
--prism-spacing-200spacing.2008pxButton side padding, gaps between grouped controls, table cells
--prism-spacing-300spacing.30012pxCard header, banner, and toast padding; extra-small icons
--prism-spacing-400spacing.40016pxCard sides and body, first and last table cell; small icons, checkboxes
--prism-spacing-500spacing.50020pxList gaps, drawer footer padding; medium icons
--prism-spacing-600spacing.60024pxSmall button, input, and select height; large icons
--prism-spacing-700spacing.70028px–
--prism-spacing-800spacing.80032pxDefault button, input, and select height; table header row
--prism-spacing-900spacing.90036pxTable row height, alert padding
--prism-spacing-1000spacing.100040pxLarge button height, navigation menu items