Space
Properties
Property | Type | Description |
---|---|---|
direction | horizontal , vertical | Direction of the spacing |
size | small , middle , large , number | Amount of spacing between elements |
align | center , start , end , baseline | Alignment of elements |
wrap | boolean | Auto wrap line |
block | boolean | Weather to fit width to parent width |
[events] | function | Please read the events page |
All properties are optional.
Children
Can have children.
Example
local space = myUI:createElement("Space", {
width = "100%",
height = "100%",
}, {
myUI:createElement("Button", {text = "1"}),
myUI:createElement("Button", {text = "2"}),
myUI:createElement("Button", {text = "3"})
})
This is how it looks in-game:

Direction
Sets the direction of the spacing.
This is how it looks withvertical
direction:

Size
Sets the size of the spacing between elements.

Align
Sets the alignment of child elements. y-axis.




Wrap
Auto wraps the child elements within the parent element.
