Builtin Library
README.md
iconBtn
Button rendered with the phosphor glyph font. Convenience wrapper over
Z.btn for the common case of an icon-only button — defaults the
fontFamily to phosphor so callers don't repeat it on every click
target.
Exports
iconBtn(iconText: string, callbackId: string, opts: table?) -> WidgetNode— module returns the builder function directly.
opts is forwarded to Z.btn; this wrapper only injects
opts.style.fontFamily = "phosphor" when none is set.
Usage
local Z = require("@builtin::modules.zui")
Z.iconBtn("", "save:click", { id = "save", tooltip = "Save" })
Notes
- Equivalent to
Z.iconButton(which simply re-requires this module). - The wrapper mutates the supplied
optstable in place. If you reuse the sameoptsacross calls, expectstyle.fontFamilyto persist. - Any explicit
opts.style.fontFamilywins; the default only fires when the field is missing.