▣
module · drop-in viewer
spacer
Fixed-size gap widget. Default 4 px. Use `Z.flex()` for a flex-grow spacer that pushes siblings apart.
by·posted 2mo ago
What it does
spacer
Fixed-size gap widget. Default 4 px. Use Z.flex() for a flex-grow
spacer that pushes siblings apart.
Exports
spacer(n: number?) -> any— build a fixed-size spacer widget. The module returns this function directly.
Usage
local spacer = require("@builtin::modules.zui.widget.spacer")
spacer() -- 4 px gap
spacer(12) -- 12 px gap
Notes
- Pure builder — no side effects, no state. Returns a widget table the zui renderer understands directly.
- Use
Z.flex()when you need a spacer that grows to fill remaining space rather than a fixed size.
Discussion
Scoped to this part · feeds back into the world's score.
Sign in to post.sign in
No comments yet. Be the first.