Interface elements
The building blocks of every window, Dashboard section, settings panel and dialog.
Elements are described, not drawn: you call a constructor like ui.column{ … }, put the children inside the braces and the properties next to them, and give the result to window:render, section:render, ui.modal or plugin.settings. See Build an interface for how they fit together, and UiProps for every property in one place.
Functions
ui.column(props)
Lay children out top to bottom.
ui.row(props)
Lay children out left to right.
ui.card(props)
A box with an optional title.
ui.scroll(props)
A scrolling area (set max_height).
ui.divider(props)
A thin line between things.
Returns UiNode
ui.spacer(props)
Empty space that grows, to push what follows to the end of a row or column.
ui.text(text, props)
Text: ui.text("hi") or ui.text{ text = "hi", muted = true }.
ui.heading(text, props)
A heading. level is 1 (largest) to 3.
ui.badge(props)
A small coloured label; tone picks the colour.
ui.code(props)
A block of fixed-width text.
ui.link(label, url, props)
A link that opens in the browser (https only).
Name
Type
Returns UiNode
ui.image(props)
A picture from an https address.
ui.progress(props)
A bar showing value, from 0 to 1.
ui.button(label, on_click, props)
A button: ui.button("Add", function(ev) … end) or ui.button{ label = "Add", on_click = …, variant = "primary" }.
Name
Type
Returns UiNode
ui.input(props)
A text box. Give it a name to read it in ev.values.
ui.textarea(props)
A box for several lines of text.
ui.checkbox(props)
A tick box.
ui.switch(props)
An on/off switch.
ui.select(props)
A drop-down list of options.
ui.slider(props)
A slider between min and max.
ui.table(props)
A table: columns = { "Name", "Count" }, rows = { { "Ann", 3 }, { "Bob", 5 } }.
ui.list(props)
Children with a line between them.
ui.chat(props)
Chat messages drawn like the Dashboard's chat: ui.chat{ messages = chats.get{ limit = 20 } }.
Types
Open a type to see its fields; type names above link here.

