How to Apply Custom CSS to Disable a Toggle Based on a Condition?

I’m trying to style a toggle button in the “Distribute” column of my data table so that it’s visually different and unclickable when Status is not equal to “Fresh”. I’d like to apply custom CSS to achieve this.

I’ve experimented with conditional states, but I haven’t been able to get it working as expected. Could someone guide me through the best approach for conditionally applying CSS to disable and style this toggle in WeWeb?

Thanks in advance!

Hello @versb

You can create a new State for your toggle that you name “Disabled” for exemple, and custom the UI of your disabled toggle. You can bind th condition of this state with item.data.status != "Fresh" or smt like this.

You should also apply this same condition on the Disabled parameter

Let me know if that helps!