Builtin Library
README.md
hbox
Horizontal layout container. Children laid out left-to-right; spacing
via style.gap; alignment via style.align ("start" | "center" |
"end").
Exports
hbox(children: { WidgetNode }?, opts: HboxOpts?) -> WidgetNode— build a horizontal-layout container.
Types:
HboxOpts = { id: string?, classes: (string | { string })?, props: { [string]: any }?, style: { [string]: any }? }WidgetNode = { [string]: any }— widget table (interoperable with hand-written widget trees).
Usage
local Z = require("@builtin::modules.zui")
local row = Z.hbox({ Z.lbl("a"), Z.lbl("b") }, {
style = { gap = 6, align = "center" },
})
Notes
- Pure builder over
modules.zui.widget.node— no state, no engine calls. Safe at module load. childrendefaults to{}when nil so an empty hbox is a no-op.style.gapis the inter-child spacing in pixels;style.aligncontrols cross-axis alignment.