Enabled
Show and hide controls based on another control's value.
The enabled key in an object's properties can be set using a logical expression that evaluates to true or false. This determines whether a specific UI element is enabled or disabled based on the conditions specified in the expression. Works in the same way as visible.
Boolean Logic: Use logical operators (
&&,||) to combine multiple conditions.Comparison Operators: Use
==,!=,>,<,>=,<=to compare values.
Examples
Complex Condition
"enabled": "(backgroundType == 'custom' || backgroundType == 'image') && textColor == 'white'"This makes the property enabled only if the backgroundType is either custom' or 'image', and the textColor is 'white'.
Visibility Based on Numeric Ranges
"enabled": "opacity > 20 && opacity < 30"Useful for enabling controls that should only be visible within a specific range.
Negation to Hide Elements
"enabled": "mySwitchControl != true"The property is enabled when
mySwitchControlisfalse.
Last updated
Was this helpful?

