Class Spacer

java.lang.Object
io.mindspice.simplypages.core.HtmlTag
io.mindspice.simplypages.components.Spacer
All Implemented Interfaces:
Component

public class Spacer extends HtmlTag
Empty spacing helper for vertical or horizontal gaps.

Mutable and not thread-safe. Orientation and size styles are applied to the same instance. Mutate within a request-scoped flow. For reuse, stop mutating and render as a stable structure with per-request slot/context values.

  • Method Details

    • vertical

      public static Spacer vertical()
      Creates a vertical spacer (adds height).
    • horizontal

      public static Spacer horizontal()
      Creates a horizontal spacer (adds width).
    • small

      public Spacer small()
      Sets small spacing (16px).
    • medium

      public Spacer medium()
      Sets medium spacing (32px).
    • large

      public Spacer large()
      Sets large spacing (48px).
    • extraLarge

      public Spacer extraLarge()
      Sets extra large spacing (64px).
    • custom

      public Spacer custom(String size)
      Sets custom spacing through raw style assembly. Supply an application-controlled or separately CSS-context-validated value; declaration separators are retained. This does not use addStyle's breakout check or the width helpers' restricted token grammar.
      Parameters:
      size - CSS size value (e.g., "50px", "3rem", "10%")
    • withClass

      public Spacer withClass(String className)
      Description copied from class: HtmlTag
      Overrides:
      withClass in class HtmlTag