Image-button widget
The image-button widget is an image that is a button.
Properties
This widget inherits the properties of Button widget. It also has the following properties:
Property |
Description |
Data type |
---|---|---|
|
See Context properties. |
string (JSON) |
|
Name of event that fires when a user clicks the button. |
string |
|
The following icon settings:
|
string and enum |
|
Unique identifier of this widget. |
string |
|
This property is optional. (Default is small.) |
enum |
|
Optional property defining image button style, which is one of:
|
enum |
|
Text displayed on the button. |
string |
|
Title displayed on the button. |
string |
type
|
Rich-media type, which is always ImageButton . |
string |
Context properties
Context property |
Description |
Data type |
---|---|---|
|
Accepts either:
|
either enum or string (JSON with hex color code) |
|
The text color, as a hex color code. |
string (hex color code) |
|
The label color, as a hex color code. |
string (hex color code) |
Code samples

var obj = {
"widgetType": "form",
"nodes":
[{
"id": "widget1",
"controls": {
"0": {
"type": "ImageButton",
"id": "button0",
"context": {
"color": "primary",
"textAlign": "left",
"titleColor": "#0000ff"
},
"style": "outline-block",
"text": "Wait time 4 min",
"title": "CHAT",
"event": {
"name": "onlogin"
},
"icon": {
"name": "icono-commentEmpty",
"align": "top"
}
},
"1": {
"type": "ImageButton",
"id": "button1",
"context": "secondary",
"style": "outline-block",
"text": " ",
"icon": {
"name": "icono-commentEmpty",
"align": "center"
}
},
"2": {
"type": "ImageButton",
"id": "button0",
"context": {
"color": "primary",
"textAlign": "center",
"titleColor": "#0000ff"
},
"style": "outline-block",
"text": "Wait time 4 min",
"title": "CHAT",
"event": {
"name": "onlogin"
}
},
"3": {
"type": "ImageButton",
"id": "button0",
"context": {
"color": "primary",
"textAlign": "center",
"titleColor": "#0000ff"
},
"style": "outline-block",
"text": "Wait time 4 min",
"event": {
"name": "onlogin"
},
"icon": {
"name": "icono-commentEmpty",
"align": "center"
}
},
"4": {
"type": "ImageButton",
"id": "button20",
"context": {
"color": "primary",
"textAlign": "center",
"titleColor": "#0000ff"
},
"style": "outline-block",
"text": "Wait time 4 min",
"event": {
"name": "onlogin"
},
"icon": {
"name": "icono-commentEmpty",
"align": "center",
"position": "right"
}
}
}
}
]
}

var obj = {
"widgetType": "form",
"nodes":
[{
"id": "widget1",
"controls": {
"0": [{
"type": "ImageButton",
"id": "button0",
"context": {
"color": "primary",
"textAlign": "left",
"titleColor": "#0000ff"
},
"text": "Wait time 4 min",
"title": "CHAT",
"event": {
"name": "onlogin"
},
"icon": {
"name": "icono-commentEmpty",
"align": "top"
}
}, {
"type": "ImageButton",
"id": "button1",
"context": "secondary",
"icon": {
"name": "icono-commentEmpty"
}
}, {
"type": "ImageButton",
"id": "button0",
"context": {
"color": "primary",
"textAlign": "center",
"titleColor": "#0000ff"
},
"title": "CHAT",
"event": {
"name": "onlogin"
}
}
]
}
}
]
}