Log inGet started
Package

flex.module

Newest version

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

README.md

flex

Flex-grow spacer. Pushes siblings apart inside an hbox/vbox — use to right-align items in a horizontal row, etc. The engine treats a spacer with no space set as flex-grow.

Exports

  • flex() -> Spacer — build a flex-grow spacer widget table.

Types:

  • Spacer = { type: string }

Usage

local Z = require("@builtin::modules.zui")
local row = Z.hbox({ Z.lbl("left"), Z.flex(), Z.lbl("right") })

Notes

  • Pure function — no engine calls, no state. Safe at module load time.
  • The returned table is interoperable with hand-written widget trees; any container that accepts a { type = "spacer" } child will treat it as flex-grow.