Skip to main content

Spacer Widget

Overviewโ€‹

The Spacer widget is a non-interactive layout utility used to add vertical space between interface components. It provides consistent spacing control while supporting dynamic visibility and styling.

Spacer Widget
Spacer Widget

Basic Configurationโ€‹

Global Settingsโ€‹

Nameโ€‹

  • Field: Name
  • Description: Display name for the widget in the interface builder
  • Type: Text input
  • Required: Yes

Variable/Modelโ€‹

  • Field: Variable/Model
  • Description: Not applicable โ€“ Spacer does not bind to a model
  • Type: N/A
  • Required: No
Spacer Configuration
Spacer Configuration

Validationโ€‹

  • Available: Controls if the widget is available on the screen
  • Visibility: Controls whether the spacer is displayed
  • Required: Not applicable
  • Disable: Not applicable
Spacer Validation
Spacer Validation

Stylingโ€‹

Layout Optionsโ€‹

  • Width: Inherits from parent container
  • Height: Configurable via widget settings
  • Class: Add custom CSS classes for additional styling

Dynamic Classesโ€‹

Dynamic classes can be applied using configuration:

{
"hidden": "{{isMobile}}",
"highlight": "{{isImportant}}"
}
Spacer Styling
Spacer Styling

Best Practicesโ€‹

  1. Use only when necessary โ€“ Prefer margin/padding for simple spacing
  2. Keep consistent sizes โ€“ Apply standard spacing values across the interface
  3. Responsive design โ€“ Use relative units (vh, %, em) when targeting multiple screen sizes
  4. Combine with layouts โ€“ Works best when used in grid or row containers

Accessibility Considerationsโ€‹

  • Spacer has no impact on accessibility tools
  • Ignored by screen readers
  • Does not affect keyboard navigation

Performance Tipsโ€‹

  • Very lightweight, minimal rendering cost
  • Use static sizes where possible for predictable layouts

Troubleshootingโ€‹

Spacer not visible

  • Check visible property is set to true
  • Ensure height is configured with valid CSS units

Unexpected size

  • Verify container styling does not override spacer height
  • Inspect computed CSS with developer tools

Class not applied

  • Remove commas in class names
  • Ensure CSS class definitions exist