PhotonUI logo

PhotonUI

A javascript framework to create user interfaces

MenuItem

photonui.MenuItem is a widget that can be used inside any photonui.Menu, photonui.Select or photonui.Popupmenu widgets.

Class Reference

More examples

Inside a photonui.Select

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
var select = new photonui.Select({
value: "item1",
children: [
new photonui.MenuItem({value: "item1", text: "Item 1"}),
new photonui.MenuItem({value: "item2", text: "Item 2"}),
new photonui.MenuItem({value: "item3", text: "Item 3"})
],
callbacks: {
"value-changed": function(widget, value) {
alert("Value changed: " + value);
}
}
});

photonui.domInsert(select, "demo");