passwordfield Component
Use the passwordfield component to display a field that obscures typed characters to protect sensitive data, such as passwords and API keys.
{
"type": "passwordfield"
}
Properties
- text
- STRING [getter]
Get the password from the password field in an action with this property.
CautionDon't pre-set a password
texton the password field, deal with this in your backend logic.
- colour
- COLOUR
The text colour (hex, hsv, rgb, user-defined colour constants, or Apple system colours e.g. Banana, systemOrangeColor). Default textColor
Also see Shared Properties.
Example Workflows
A password field with a button to reveal its contents
{
"type": "view",
"layout": "inline",
"direction": "vertical",
"components": [
{
"id": "passwordlabel",
"type": "label",
"text": "Password will appear here when pressing the button"
},
{
"id": "passwordinput",
"type": "passwordfield"
},
{
"type": "button",
"text": "Reveal Password",
"events": [
{
"trigers": "actioned",
"action": {
"type": "json",
"variables": {
"password": "{value:passwordinput.text}"
},
"src": {
"update": {
"ids": {
"passwordlabel": {
"text": "{var:password}"
}
}
}
}
}
}
]
}
]
}