Skip to main content

Spacer Element

The Spacer element adds empty vertical space between elements. Use spacers for precise control over layout spacing.

Overview

PropertyValue
Element Typespacer
Can Contain ChildrenNo
PurposeVertical spacing

Use Cases

  • Adding space between sections
  • Creating breathing room in layouts
  • Fine-tuning vertical rhythm
  • Device-specific spacing adjustments
  • Separating content groups

Size Settings

Height

Set the spacer height:

ValueDescription
8pxExtra small
16pxSmall
24pxMedium
32pxLarge
48pxExtra large
64px+Section gap

Device-Specific Heights

Set different heights per device:

DeviceTypical Use
DesktopStandard spacing
TabletSlightly reduced
MobileCompact spacing

Example:

Desktop: 48px
Tablet: 32px
Mobile: 24px

Visual Settings

Background Color

Spacers can have a background color for debugging or design:

OptionUse Case
TransparentNormal use
ColoredDebugging layout
AccentDesign element
Debugging

Temporarily add a light background color to see spacer positions, then remove for production.

Layout Settings

Width

Spacers typically span full width:

OptionDescription
Full100% width (default)
FixedSpecific width

Advanced Settings

HTML ID

Custom ID for targeting.

CSS Classes

Add custom classes.

Device Visibility

Hide spacer on specific devices:

OptionUse Case
Hide on DesktopMobile-only spacing
Hide on MobileDesktop-only spacing

Examples

Standard Section Gap

Settings:

  • Height: 32px
  • Background: Transparent

Large Section Break

Settings:

  • Height Desktop: 64px
  • Height Tablet: 48px
  • Height Mobile: 32px

Responsive Spacing

Between header and content:

Desktop: 40px
Tablet: 32px
Mobile: 24px

Spacer vs. Margin

When to use each:

Use Spacer When:

  • You need device-specific spacing
  • Space doesn't belong to any element
  • Creating section gaps
  • You want explicit control

Use Margin When:

  • Space relates to a specific element
  • Consistent spacing across breakpoints
  • Element-level design decisions

Common Spacing Values

ValueUse Case
8pxTight spacing, related elements
16pxStandard element gap
24pxContent group separation
32pxSection spacing
48pxMajor section gap
64pxHero to content gap

Spacing Rhythm

Maintain consistent spacing rhythm:

Heading
[8px spacer]
Text
[16px spacer]
Text
[24px spacer]
Button
[32px spacer]
Divider
[32px spacer]
Next Section

Best Practices

  1. Be consistent — Use a spacing scale (8, 16, 24, 32, 48)
  2. Responsive — Reduce spacing on mobile
  3. Don't overdo it — Too many spacers complicate layouts
  4. Use margins first — Spacers for special cases
  5. Document your scale — Keep spacing predictable

Debugging Spacers

If your layout isn't working:

  1. Add temporary background color to spacers
  2. Check device-specific values
  3. Verify spacer isn't hidden on current device
  4. Check parent container overflow settings
  5. Review margin/padding on adjacent elements
  • Divider — Visual line separation
  • Section — Section containers
  • Text — Content with margin