Class Spacer
java.lang.Object
io.mindspice.simplypages.core.HtmlTag
io.mindspice.simplypages.components.Spacer
- All Implemented Interfaces:
Component
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.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class HtmlTag
attributes, children, id, innerText, innerTextSlot, selfClosing, tagName, trustedHtml -
Method Summary
Modifier and TypeMethodDescriptionSets custom spacing through raw style assembly.Sets extra large spacing (64px).static SpacerCreates a horizontal spacer (adds width).large()Sets large spacing (48px).medium()Sets medium spacing (32px).small()Sets small spacing (16px).static Spacervertical()Creates a vertical spacer (adds height).Alias forHtmlTag.addClass(String).Methods inherited from class HtmlTag
addClass, addStyle, addTrustedStyle, getChildrenStream, getId, hxDelete, hxGet, hxInclude, hxPatch, hxPost, hxPushUrl, hxPut, hxScrollTargetTop, hxSwap, hxTarget, hxTrigger, render, withAttribute, withChild, withId, withInnerText, withInnerText, withMaxWidth, withMinWidth, withUnsafeHtml, withWidth
-
Method Details
-
vertical
Creates a vertical spacer (adds height). -
horizontal
Creates a horizontal spacer (adds width). -
small
Sets small spacing (16px). -
medium
Sets medium spacing (32px). -
large
Sets large spacing (48px). -
extraLarge
Sets extra large spacing (64px). -
custom
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
-