Flex
Properties
Property | Type | Optional | Description |
---|---|---|---|
vertical | boolean | yes | The direction of the flex |
wrap | boolean | yes | Auto wrap line |
justify | flex-start, center, flex-end, space-between, space-around, space-evenly | yes | The alignment of the elements, x axis |
align | flex-start, center, flex-end | yes | The alignment of the elements, y axis |
gap | small, middle, large, string, number | yes | The gap between grips |
[events] | function | yes | Please read the events page |
Children
Can have children.
Exmaple
local b1 = AM:createElement("Button", {
text = "Hello, World!",
icon = "AimOutlined",
})
local b2 = AM:createElement("Button", {
type = "link",
text = "Hello, World!",
})
local f1 = AM:createElement("Flex", {
width = "100%",
height = "100%",
}, {
b1,
b2
})
This is how it looks in-game:

Vertical
When true the direction of the flex changes to vertical display instead of horizontal.

Wrap
When true, the content will automaticly be wrapped.

Justify
Sets the alignment of elements in the x-axis.






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



Gap
Sets the gap between elements.
small
, middle
, large
are preset that can be used.
But can be any css, and when its a number its defaulting to pixels.



