How to toggle variants based on a boolean inside of the code component

Hi :slight_smile:
I have a code component with a boolean inside of it. How can I change the variant of the component in Plasmic Editor based on the state of this boolean? Basically I want to have “styles” created inside of the Editor, but toggle them depending on a condition which resides inside of the component’s code.

Hi, you would need to expose your code component state Code components API reference | Learn Plasmic

1 Like