Dynamic Class Rule
MaestroThe UI design product. |
Form Builder | All versions
This feature is related to all versions.
Maestro allows you to apply one or more classes to a component if a condition is true
.
To create a Dynamic Class rule:
- Inside the Maestro Editor, select a component from the View pane.
- In the Properties pane, click the Create Rule button.
- Click the Dynamic Class link, located under the Style heading.
-
Define the JavaScript-based logic of the rule within the code editor. As a Style rule, the Dynamic Class rule should return a string or an object with the classes defined as keys.
- Click Save.
The rule will appear in the Properties pane, under the Rules heading.
Next, learn about the Validation rule.