States
States are named boolean expressions evaluated against the live form data. They let you describe complex conditional behavior once and reuse it across many widgets — without scattering inline conditionals throughout your form definition.
const states = { hasDiscount: '$form.hasDiscountCode === true', isAdult: '$form.driverAge >= 18',};You can then refer to these names in include / exclude rules, in per-widget property overrides, and in event handlers. See the sub-pages for each pattern.
In this section
Section titled “In this section”- Include & Exclude — gate which widgets render.
- Properties — override widget props per state.
- Inline
when— ad-hoc conditionals without naming a state. - Composing states — combine multiple state expressions.