Log inGet started
Package

split.module

Newest version

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

README.md

split

Two-pane resizable split. direction is "horizontal" or "vertical"; firstSize is the first pane's size in pixels (or 0..1 for proportional). Children must be exactly two widgets.

Exports

  • split(children: { any }?, opts: SplitOpts?) -> any — build a two-pane resizable split widget. The module returns this function directly.

Types:

  • SplitOpts = { id: string?, direction: string?, firstSize: number?, props: { [string]: any }?, style: { [string]: any }? }

Usage

local split = require("@builtin::modules.zui.widget.split")
split({ leftWidget, rightWidget }, {
    direction = "horizontal",
    firstSize = 200,
})

Notes

  • direction defaults to "horizontal" when omitted.
  • firstSize accepts pixels (>= 1) or a proportion in 0..1.
  • Children must be exactly two widgets — wrap multiple widgets in a layout container if more pane content is needed.