Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commitdd348ac6c3

README.md

window

Floating window. Root-only — must be the top-level widget of its registered screen. Pass movable, resizable, closable, pos (default position, only honored on first frame), and onClose to wire the close button.

Exports

  • window(title, children, opts?) -> Node — returns the window widget node. Module returns the builder function directly.

Types:

  • WindowOpts = { id?, movable?, resizable?, closable?, pos?, onClose?, props?, style? }

Usage

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

window("Inspector", { body }, {
    movable  = true,
    closable = true,
    onClose  = "inspector:close",
})

Notes

  • Signature is window(title, children, opts); the older window(children, opts) shape now warns loudly via log.warn instead of falling back silently to the default "Window" header (closes #2342).
  • The decoder also accepts the raw form { type = "window", title = "...", children = {...} }; title is promoted into props.title automatically.
  • pos is only honored on first frame — subsequent renders preserve the user's drag position so callers never fight egui for window placement.