Files
Basalt2/docs/references/Flexbox.md
2025-02-13 09:51:51 +00:00

46 lines
898 B
Markdown

# Flexbox : Container
## Functions
|Method|Returns|Description|
|---|---|---|
|[Flexbox.new](#Flexbox.new)|Flexbox|
|[Flexbox:addChild](#Flexbox:addChild)|-|
|[Flexbox:addLineBreak](#Flexbox:addLineBreak)|Flexbox|
|[Flexbox:init](#Flexbox:init)|-|
|[Flexbox:removeChild](#Flexbox:removeChild)|-|
|[Flexbox:render](#Flexbox:render)|-|
## Flexbox.new(props, basalt)
Creates a new Flexbox instance
### Parameters
* `props` `table` The properties to initialize the element with
* `basalt` `table` The basalt instance
### Returns
* `Flexbox` `object` The newly created Flexbox instance
### Usage
```lua
local element = Flexbox.new("myId", basalt)
```
## Flexbox:addChild()
## Flexbox:addLineBreak(self)
Adds a new line break to the flexbox.
### Parameters
* `self` `Flexbox` The element itself
### Returns
* `nil` `nil` nil
## Flexbox:init()
## Flexbox:removeChild()
## Flexbox:render()