Switch
Usage
A special button that enables the user to select or deselect a value, usually within a set of options.
JSON structure example
"viewDefinition": {
"children": {
"switchComponent": {
"type": "switch",
"id": "someId",
"disabled": true,
"size": "default",
"name": "someName",
"value": "bananas",
"text": "Some cool text"
}
}
}
type
(String) - the type attribute for a switchid
(String) - an id for the componentdisabled
(Boolean) - set to true in order to disable the component- Default:
false
- Default:
size
(String) (Optional) - defines the size of the component, choose from:- Allowed values: {
default
,small
} - Default:
default
name
(String) - Name for componenttext
(String) - Label textvalue
(String) - Value provided enabling switch