Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commit61a33237e0

README.md

docked

Pre-built docked-panel shell — Z.shell.docked { top, left, center, right, bottom }. Captures the wrapper shape every demo's "toolbar + body + status" layout reinvents: outer vbox with gap=0, theme bg, the center slot flex-grows, and missing slots are skipped cleanly. The module returns the shell function directly.

Exports

  • dockedShell(opts: DockedOpts?) -> vbox-widget — render a docked layout from top/left/center/right/bottom slots.

Types:

  • DockedOpts = { id?, class?, classes?, top?, left?, center?, right?, bottom?, background?, minWidth?, minHeight? }

Usage

local dockedShell = require("@builtin::modules.zui.shell.docked")
dockedShell { top = toolbar, center = body, bottom = status }

Notes

  • The center slot is stamped with flex = 1 so it fills the middle row horizontally. The caller's widget table is NOT mutated — its style is shallow-cloned before stamping.
  • nil slots disappear from the rendered tree. The middle row is omitted entirely when left/center/right are all nil.
  • Defaults: gap = 0, theme bg background, minWidth = 100, minHeight = 100.