Builtin Library
README.md
section
Panel with a bold header label on top. Convenience composition — every
demo had its own version before this widget existed. The header style
defaults to a small accent label; override via opts.headerStyle.
Exports
section(title: any, children: { any }?, opts: SectionOpts?) -> any— build a panel with a bold header label. The module returns this function directly.
Types:
SectionOpts = { id: string?, classes: (string | { string })?, props: { [string]: any }?, style: { [string]: any }?, headerStyle: { [string]: any }?, titleColor: string?, bg: string?, border: string?, borderWidth: number?, padding: any?, gap: number?, minWidth: number?, minHeight: number?, maxWidth: number?, maxHeight: number? }
Usage
local section = require("@builtin::modules.zui.widget.section")
section("Settings", { Z.label("hello") })
Notes
- The
titleis coerced viatostring, so non-string values are accepted as headers. opts.headerStylefully replaces the default header style — pass a table containing every field you want set, not a partial override.- All standard panel options (
bg,border,padding, ...) flow through to the wrapping panel.