Builtin Library
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 = 1so it fills the middle row horizontally. The caller's widget table is NOT mutated — its style is shallow-cloned before stamping. nilslots disappear from the rendered tree. The middle row is omitted entirely when left/center/right are allnil.- Defaults:
gap = 0, themebgbackground,minWidth = 100,minHeight = 100.