Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commitdd348ac6c3

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 as Z.lbl.

Options (top-level shortcuts mapped onto style):

  • color: string?
  • fontSize: number?
  • fontWeight: string?
  • bold: boolean? — sets fontWeight = "bold" when true.
  • bg: string? — sets style.background.
  • padding: any?
  • minWidth: number?
  • font: string? — sets style.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

  • text is coerced to a string via tostring(text or ""). Passing nil yields the empty string.
  • The shortcut props overwrite any conflicting field on style.
  • Stateless — no module state, no engine calls.