photonui.Label can be instantiated in a shorter way:
1 2
var label = new photonui.Label("My Label"); photonui.domInsert(label, "demo");
With more params:
1 2 3 4 5
var label = new photonui.Label("My Label", { textAlign: "right" });
photonui.domInsert(label, "demo");
More examples
1 2 3 4 5 6 7 8 9 10 11 12 13 14
var grid = new photonui.BoxLayout({ orientation: "horizontal", children: [ new photonui.Label({ text: "My Label:", forInputName: "my-text-field" }), new photonui.TextField({ name: "my-text-field" }) ] });