How to configure spacing
Open Coreframe and click the Spacing tab. The generator has three sections: Primitive, Semantic, and Component.- Set your base unit — enter a value in pixels or click one of the preset buttons:
2px,4px, or8px. A 4 px grid works well for dense UIs; an 8 px grid suits more spacious layouts. Click Generate to compute the full primitive spacing scale. - Preview the scale — Coreframe calculates 19 steps from the base unit using a set of multipliers:
0×,0.5×,1×,1.5×,2×,2.5×,3×,4×,5×,6×,7×,8×,10×,12×,14×,16×,20×,24×, and32×. On a 4 px base, this produces values from0 pxthrough128 px. - Map semantic tokens — click the Semantic tab to review the pre-built semantic aliases. These map abstract roles such as
space-sm,inset-default,stack-tight, orlayout-defaultto specific primitive steps. Pro users can rename, repoint, or add custom mappings. - Map component tokens — on the Component tab, each UI component (Button, Card, Modal, Input, and many others) lists its spacing slots — padding-x, padding-y, gap — each pointing at a semantic token. Pro users can adjust these mappings before generating.
- Click Generate — on the Component tab, click Generate spacing token to push all variables into Figma.
What gets created
Coreframe writes variables into two Figma collections:- Spacing collection — contains all primitive variables (e.g.,
spacing-0,spacing-1,spacing-2…spacing-32) and semantic variables (e.g.,space-sm,layout-default,inset-default,component-comfortable). Primitive variables are scoped toGAPandWIDTH_HEIGHTand hidden from publishing to keep the panel clean. - Component collection — contains component-level spacing variables such as
button-padding-xandcard-gap. These reference semantic variables via aliases, so updating a semantic mapping propagates to every component that uses it. Component spacing variables are included for Pro users.
