Skip to content

Spacing#

Eufemia's spacing scale provides named values for margins, padding and gaps through the existing --spacing-* CSS properties. Pass the matching names, such as small or large, to the Space component and component spacing props. These properties are part of Eufemia's established spacing API.

PixelTypeRemCSS Variable
4xx-small0.25--spacing-xx-small
8x-small0.5--spacing-x-small
16small1--spacing-small
24medium1.5--spacing-medium
32large2--spacing-large
48x-large3--spacing-x-large
56xx-large3.5--spacing-xx-large

NB: When combining sizes we only allow increments of 0.5rem, so xx-small will not increment by 0.25rem when combined with other sizes.

See the Spacing guide for CSS custom properties and spacing helpers.

Suggest an edit