NUI / Components / Common
Spacer
Spacer creates empty space in a layout.
Supported as an empty layout spacer.
Overview
Spacer creates empty space in a layout.
When to use
- Use Spacer to add fixed space or consume flexible space in row, column, stack, and scroll layouts.
Children
Does not support children.
Basic syntax
Spacer Gap {
height: 12
}Supported properties
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
width | number | No | Auto | Desired width. |
height | number | No | Auto | Desired height. |
minWidth | number | No | Unset | Minimum width. |
minHeight | number | No | Unset | Minimum height. |
maxWidth | number | No | Unset | Maximum width. |
maxHeight | number | No | Unset | Maximum height. |
visible | bool | No | true | Visibility flag. |
Contextual properties
Contextual property rules
Spacer commonly uses fill or auto when it is a direct child of a stack-like parent. It may also receive canvas, grid, wrap, or ExpandableArea slot properties in matching parent contexts. See section 7.
Full syntax example
Spacer Gap {
width: 16
height: 12
minWidth: 8
minHeight: 8
maxWidth: 40
maxHeight: 40
visible: true
}Limitations
- Spacer is intentionally invisible.
- Flexible sizing belongs in contextual stack child properties, not in normal top-level syntax.