Space
- Demonstration: N/A
- Java API: org.zkoss.zul.Space
- JavaScript API: zul.wgt.Space
Employment/Purpose
Space is a Separator with the orient default to “horizontal”. In other
words,
Common Use Cases
Horizontal spacing between inline components
Use <space> to insert a fixed gap between two inline elements without introducing a line break.
<hbox>
<label value="First"/>
<space spacing="10px"/>
<label value="Second"/>
</hbox>
Visual bar separator
Set bar="true" to render a visible dividing line between adjacent components.
<hbox>
<button label="Save"/>
<space bar="true"/>
<button label="Cancel"/>
</hbox>
Adjusting spacing size
Control the gap size with the spacing attribute (any valid CSS length value).
<hbox>
<label value="A"/>
<space spacing="20px"/>
<label value="B"/>
</hbox>
Example

<zk>
<space bar="true"/>
<space bar="true"/>
<space bar="true"/>
<space bar="true"/>
</zk>
Supported Events
| Name | Event Type | Description | |——|————|————-|
No additional events are defined. Inherited events: see Separator.
Supported Children
*NONE