Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commitdd348ac6c3

README.md

grid

Fixed-column grid container. Children flow left-to-right then wrap. columns is required.

Exports

  • grid(children: { WidgetNode }?, columns: number, opts: GridOpts?) -> WidgetNode — build a fixed-column grid container.

Types:

  • GridOpts = { id: string?, classes: (string | { string })?, props: { [string]: any }?, style: { [string]: any }? }
  • WidgetNode = { [string]: any } — widget table (interoperable with hand-written widget trees).

Usage

local Z = require("@builtin::modules.zui")

local g = Z.grid({ a, b, c, d }, 2, { style = { gap = 4 } })

Notes

  • Pure builder — no state, no engine calls. Safe at module load.
  • children defaults to {} when nil; columns has no default and must be provided.
  • The columns value is forwarded to the engine as props.columns; any other props the caller passes survive untouched.