Log inGet started
Package

iconBtn.module

Newest version

This package holds more than this page lists. See all of its files in its world.

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 opts table in place. If you reuse the same opts across calls, expect style.fontFamily to persist.
  • Any explicit opts.style.fontFamily wins; the default only fires when the field is missing.