Accessing global variants from interaction

Hey Team!
I’m playing around in the editor with global variants to theme a website differently.
I want to have a button to switch between global variants inside a set of global variants.
How can I access these global variants from an interaction? I guess with “Run Code”? But which code? Something like $state.global.set? Would appreciate some help!

Hi! At the moment there’s no built-in way of doing this :confused: You would have to run your own app (instead of using Plasmic hosting), have some React state at the root of your app for the global variant values, pass them into <PlasmicRootProvider globalVariants={{...}} , and wire up your toggle button to update the global variant value stored in your state :confounded:

Ah okay, I see, thank you for the response :blush: