Builtin Library
README.md
badge
Alias for chip — kept as its own module for vocabulary clarity. Pick whichever name reads better at the call site; both compile to the same widget under the hood.
Exports
This module re-exports modules.zui.widget.chip directly. There are no
typed functions or types declared here — the public surface is whatever
chip exposes.
badge(...) -> Node— identical tochip(...).
Usage
local badge = require("@builtin::modules.zui.widget.badge")
local newBadge = badge("New", { variant = "info" })
Notes
- This module is a thin re-export —
badge == chip(same function reference). Hot-reloading either reloads both. - See
modules.zui.widget.chipfor the full argument / option surface and type signature. - The alias exists purely so call sites can say
badgewhen that reads better (e.g. "new feature" badge) andchipwhen that reads better (e.g. a removable tag chip). There is no behavioural difference.