Conditional styling of checkboxes

Hi! Is there a way to conditionally style checkboxes without using a coded component?
I’m looking for a similar behaviour as can be achieved on text inputs by defining the error state.

image

Hi!

Checkboxes have a “Color” property which can be of type “Error”. However, it is unfortunately not possible to assign this property in a conditional style.

Similar behavior could be achieved with a coded component, as you suggested, but another solution could be with a Visibility Group, where the visible conditions determine if a checkbox in “Error” color is shown, or a checkbox in “Default” color is shown.

Rhys

Hey Rhys,

Unfortunately, the color property on the checkbox only affects the box itself when it’s checked. That means it doesn’t help indicate that a checkbox is required, since the user won’t see any feedback until after they’ve checked it. I guess we’ll have to use a coded component for the time being, but it would be great to have conditional styling that also affects the text and not just the box available in Appfarm at some point.

Understood, thank you! A coded component is probably best, but this wish is registered internally now as one that has come from the Community.

1 Like