PropRef
Generated
This page is generated by docs/site/scripts/gen-api.mjs from firmware/src/ui/Ui.h; descriptions and examples live in docs/site/scripts/api-notes.json.
Runtime prop updates without a rebuild: ui.prop("temp").label("Boiler temp").color("#f00"); collects the changes and sends one prop message to all clients when the temporary PropRef goes out of scope (end of the statement). The firmware keeps mutable props so a later ui resend is consistent.
Props
label
PropRef& label(const char* v)New label.
ui.prop("temp").label("Temp (HOT)");color
PropRef& color(const char* v)New accent color.
ui.prop("temp").color("#ff0000");hint
PropRef& hint(const char* v)New hint text.
ui.prop("reset").hint("Press to clear");icon
PropRef& icon(const char* v)New icon.
ui.prop("pump").icon("water_drop");unit
PropRef& unit(const char* v)New unit.
ui.prop("temp").unit("°F");src
PropRef& src(const char* v)New image / stream URL.
ui.prop("img").src("http://192.168.1.60/latest.jpg");text
PropRef& text(const char* v)New paragraph for a textblock.
ui.prop("help").text("Pump disabled while heating.");min
PropRef& min(float v)New minimum.
ui.prop("target").min(10);max
PropRef& max(float v)New maximum.
ui.prop("target").max(150);step
PropRef& step(float v)New step.
ui.prop("target").step(5);options
PropRef& options(const std::vector<const char*>& opts)Replaces the options of a select / flags widget.
ui.prop("mode").options({"Off", "Eco", "Boost"});Visibility
disabled
PropRef& disabled(bool v)Enable/disable the widget.
ui.prop("pump").disabled(true);visible
PropRef& visible(bool v)Show/hide the widget (same as ui.show()).
ui.prop("reset").visible(false);Generic
str
PropRef& str(PKey k, const char* v)Any string prop by key.
ui.prop("x").str(PKey::style, "seg");num
PropRef& num(PKey k, float v)Any numeric prop by key.
ui.prop("c").num(PKey::win, 120);boolean
PropRef& boolean(PKey k, bool v)Any boolean prop by key.
ui.prop("c").boolean(PKey::legend, false);