minetest-flow/doc/hiding-elements.md
2025-02-27 17:33:13 +13:00

21 lines
496 B
Markdown

# Hiding elements
Elements inside boxes can have `visible = false` set to hide them from the
player. Elements hidden this way will still take up space like with
`visibility: hidden;` in CSS.
## Example
```lua
gui.VBox{
gui.Button{label = "First button"},
gui.Button{label = "Hidden", visible = false},
gui.Button{label = "Last button"},
}
```
## Alternatives
If you don't want hidden elements to take up any space, see the documentation
for [gui.Nil](layout-elements.md#guinil).