Builtin Library
- ..
- .metadata17 B
- README.md2.7 KB
- _axes.module
- _markers.module
- _rowCanvas.module
- _viewport.module
- anchor.module
- area.module
- args.module
- badge.module
- bottomPanel.module
- button.module
- canvas.module
- card.module
- centralPanel.module
- checkbox.module
- chip.module
- codeEditor.module
- collapsible.module
- colorSwatch.module
- contextMenu.module
- dataView.module
- datePicker.module
- dialogueBox.module
- dndList.module
- dockArea.module
- dockPanel.module
- dragValue.module
- dropdown.module
- fader.module
- filterRow.module
- flex.module
- fs.module
- graph.module
- grid.module
- hbox.module
- healthBar.module
- hotbar.module
- icon.module
- iconBtn.module
- iconButton.module
- image.module
- init.luau8.2 KB
- input.module
- kbd.module
- knob.module
- label.module
- leftPanel.module
- lsp.module
- meter.module
- minimap.module
- modal.module
- node.module
- panel.module
- plot.module
- popup.module
- progressBar.module
- radioGroup.module
- richText.module
- rightPanel.module
- scene.module
- scroll.module
- section.module
- selectableList.module
- sep.module
- sides.module
- slider.module
- spacer.module
- split.module
- statRow.module
- statusLabel.module
- svg.module
- tabs.module
- terminal.module
- toggle.module
- topPanel.module
- tree.module
- vbox.module
- viewport.module
- window.module
README.md
widget
Widget namespace — re-exports every widget under zui.widget.<name>.
Library users can either pull the whole namespace (local W = require("modules.zui.widget"), then W.button(...)) or grab a single
widget directly (local btn = require("modules.zui.widget.button")).
Each widget lives in its own .module/ folder so authors adding a new
widget edit exactly one file. The shared primitive every widget builds
on is zui.widget.node — pulled into a user-defined widget the same
way it's pulled in here.
Exports
This module is a namespace — every field is an assignment from the matching sibling module. No typed functions live here directly; the typed surface lives on each sibling.
M.node— core widget-table constructor (modules.zui.widget.node).- Content widgets:
label,button,icon,iconBtn,iconButton,chip,badge,card,colorSwatch,dialogueBox,kbd,input,codeEditor,slider,dragValue,checkbox,toggle,dropdown,datePicker,radioGroup,selectableList,image,viewport,progressBar,richText. - DAW widgets:
fader,knob,meter. - Game-HUD widgets:
healthBar,hotbar,minimap. - Layout containers:
hbox,vbox,grid,split,sides,panel,section,scroll,collapsible,window,modal,popup,contextMenu,scene,area,anchor,topPanel,bottomPanel,leftPanel,rightPanel,centralPanel. - Leafs:
spacer,flex,sep. - Plot / Graph:
plot,graph. - Drag-and-drop list:
dndList. - Canvas:
canvas. - Composite widgets:
tabs,tree,filterRow,statRow,statusLabel. - Sub-namespaces:
lsp,fs.
Usage
local W = require("@builtin::modules.zui.widget")
return W.vbox{
W.label("Name:"),
W.input(""),
W.hbox{ W.button("Save", { onClick = "save" }), W.button("Cancel") },
}
-- Or pull single widgets directly:
local btn = require("@builtin::modules.zui.widget.button")
return btn("Save", { onClick = "save" })
Notes
- The exposed
M.nodeis the canonical primitive for user-defined widgets —require("modules.zui.widget.node")returns the same value. - Sub-namespaces (
lsp,fs) collect tightly-coupled widget sets that only make sense together — isolating them keeps the top-level surface clean. - Plot and Graph are pure-Luau builders over canvas; no
egui_plotdependency. - DndList composes per-row canvases + a transparent overlay canvas for drag-source detection and hover insertion indicators.
- All re-exports are static — adding a new widget means adding a new
M.<name> = require(...)line here (and creating the sibling module).