Builtin Library
README.md
label
Label widget — read-only text. Accepts top-level shortcuts for the
most commonly styled fields (color, fontSize, bold, bg,
padding, minWidth, font) so callers don't have to nest
everything under style = { ... }.
Exports
label(text: any, opts: LabelOpts?) -> WidgetNode— module returns the builder function directly. Also exposed asZ.lbl.
Options (top-level shortcuts mapped onto style):
color: string?fontSize: number?fontWeight: string?bold: boolean?— setsfontWeight = "bold"when true.bg: string?— setsstyle.background.padding: any?minWidth: number?font: string?— setsstyle.fontFamily.id,classes,class,style— standard widget plumbing.
Usage
local Z = require("@builtin::modules.zui")
Z.lbl("Hello")
Z.lbl("dim text", { color = "#888", bold = true })
Z.lbl(42, { fontSize = 18, font = "monospace" })
Notes
textis coerced to a string viatostring(text or ""). Passingnilyields the empty string.- The shortcut props overwrite any conflicting field on
style. - Stateless — no module state, no engine calls.