Spacer Component
A Spacer is a layout component used to create flexible empty space between other components.
Example
{
"id": /* id object */,
"subset": "spacer",
"style": {
"weight": /* dimension object */,
"width": /* dimension object */,
"height": /* dimension object */
}
}
🔑 Keys
id
- Object ID: A unique identifier used to reference this component locally or externally.
- Optional if the object is inline and not meant for reuse.
subset
- MANDATORY: Must be exactly
"spacer"to define the component type. - MANDATORY if not resolved by another pointing reference (e.g., when the component is not coming from a resolved reference).
🎨 style
The style controls how the spacer allocates space.
"style": {
"weight": /* dimension object */,
"width": /* dimension object */,
"height": /* dimension object */
}
weight: A dimension defining flexible space allocation inside aLayoutLinearcomponent. Cannot be used simultaneously withwidthorheight.width,height: A dimension defining fixed horizontal space. Cannot be used withweight.
Check dimension object Dimension object
Usage Notes
weightonly applies when the spacer is inside aLayoutLinearcomponent.- Use
widthorheightfor fixed-sized spacers outside linear layouts.