Conditional Switch variant on wheel

Hi,

I want to scroll through different variants on plasmic. So I have my component with the base class and on wheel I want that the carousel “smart” variant shows up. On the next wheel the carousel “sustainable” variant shows up. Can I do this with interactions and when code conditions?

Yes, you should be able to update the variant to a new value. Set it to a dynamic value where you enter a code expression that does the following

  1. Define an array enumerating the different variants in order
  2. If $event indicates that your mouse wheeling down, then return the next variant, otherwise return the previous variant

Let me know if that helps.

1 Like