Toggle Picker
- Print
- DarkLight
Toggle Picker
- Print
- DarkLight
Article summary
Did you find this summary helpful?
Thank you for your feedback
The Toggle Picker is a simple picker that allows users to switch between two choices. When users select the picker, nothing opens, but the choice will toggle.
Configuration Options
The picker can be configured through the following options:
Option | Type | Default | Description |
|---|---|---|---|
| array | [] | Array of items to choose from. Each item must include "id" and "title" and "isEnabled": true. Limit to two items |
| string | "" |
|
Example Configuration
{
"id": "toggle_picker",
"items": [
{
"id": "on",
"isEnabled": true,
"title": "On"
},
{
"id": "off",
"isEnabled": true,
"title": "Off"
}
],
"pickedItemId": "on",
"type": "toggle"
}Default Query Params
The toggle picker generates the following params to the API Query:
Parameter | Type | Description |
|---|---|---|
| string | selected item id |
Example request body:
"toggle_picker": {
"pickerType": "toggle",
"value": "on"
}Page Link
Example mapping for page link.
Assigning the toggle as on
Example mapping for page link.
Assigning the toggle as onAssigning the toggle as off
{
"mapping": {
'toggle': '"off"'
}
}