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:

  1. Inside the Maestro Editor, select a component from the View pane.
  2. In the Properties pane, click the Create Rule button.
  3. Click the Dynamic Class link, located under the Style heading.
  4. 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.
  5. Click Save.

The rule will appear in the Properties pane, under the Rules heading.

Next, learn about the Validation rule.