Widget UI definition
The widget UI definition contains field and group definitions in a JSON structure.
Defining UI fields
The minimal definition of a fields includes the id, type, title, and defaultValue.
id
string
(required) - field id returned in the JSON data by onSingularValue()
type
string
(required) - type of data (infotext, text, textarea, number, checkbox, composition, button, selection, JSON, color, gradient, image, timecontrol)
title
string
Field title displayed in the widget UI
defaultValue
string
Default value
{
"model": {
"fields": [
{
"id": "textId",
"type": "text",
"title": "Single line text",
"defaultValue": "enter text here ..."
},
{
"id": "numberId",
"type": "number",
"title": "Number",
"defaultValue": "50",
"min": "0",
"max": "100",
"step": "0.1",
"unit": "%",
"format": "0.1"
}
],
"groups": [...]
}
}Grouping UI fields
Use groups to arrange UI fields in cards.
Group properties:
id
string
(required) - group id
title
string
Group title
width
string
Width of card single (default) or double
toolTip
string
Tool tip trext
childIds
array of strings
Array of UI field ids
Widget UI definition - full reference
Last updated
Was this helpful?