Common component properties
Properties shared across most components, like `when` and `color`.
Some properties are shared across most Jigx components.
When
Use when to show or hide a component conditionally. It’s also used on actions to conditionally allow execution.
Accepted values
when: true(always visible / always enabled)when: false(always hidden / never enabled)when: <expression>where the expression returns a boolean
Hiding a component does not automatically change validation rules. If a field can be hidden, keep isRequired: false or make requirement conditional too.
Example and code snippet
This example displays how the when property is used at a component level to display a component.text-field (Note requirements) only when the component.checkbox (Special Diet) is selected.

Colors
Applying colors based on specific conditions: Colors can be configured based on specific conditions. For example, a payment amount exceeding a certain threshold can be displayed in red. However, conditional color configurations are only available in areas that support conditions, such as list items. In contrast, direct color options are more widely supported, for example, lists allow both conditional and direct setups, whereas interactive-images only support direct options. Additionally, certain areas restrict the available color choices, while UI elements support the predefined set of fourteen colors.
When configuring the
colorproperty, select thecolor conditionoption.Under the
whenproperty, add an expression that defines the condition under which the specified color should be applied.
Conditional color
Text or Label
Many Jigx components support configurable text and label properties to control how text is localized, formatted, and styled. Depending on the component, one or more of the options below may be available.

Last updated
Was this helpful?