Manifest
Manifest, made with Webflow by Vincent Bidaux.
ArticlesDemosKomparatorCMS TimelineContact
You can make a trigger of an interaction affect any element, even if the element has multiple classes

Affect any element with a combo class

Affect any element with a combo class

Affect any element with a combo class

Affect any element with a combo class

By Vincent Bidaux, published on
August 11, 2020
This post has been featured on the
Webflow blog
When you select Affect Another Element in an Interaction, you can only list and select elements that have only one class.
Fix
And that's sometimes an issue, forcing you to revise your structure entirely. The biggest problem is when your trigger is too high in the hierarchy, so you can't use Limit To Siblings or Limit To Nested to constraint your Interaction.

The situation

Let's build a container with three shapes. they're all shapes, but two of them are also colored, one of the colored one is green and the other orange.

Oustide of this container, let's put another container with buttons as controls to change the shape of the colored elements.

The blueprint structure looks like this.

The first interaction is pretty straight forward to build. Once the button selected and the interaction created, we Affect another element, search for shape and select it.

And we set the interaction steps.

It immediately works.

We create the same interaction in reverse for the Reset button.

So far, everything works. That's when we try to create the interaction to target the green shape that it stops working. We select the second button and create an interaction, select Affect another element and search for green.

The green shape is not listed, because it has more than one class. It has combo classes, so Webflow doesn't allow us to select it.

The trick

The trick consists in making Webflow list that class.

Let's create a dummy DIV and give it the class green. Even if you have to create the class green, that is already existing as a combo class for shape.

Now back at our interaction, we can list and select the class green.

And build the Opacity change interaction.

Once that's done, we can delete the dummy DIV, it's useless now.

The interaction properly works...

And the Reset interaction still works... So it's not really the original green class that has been affected because it shouldn't, logically.

We can create a new control, using the same system. Creating a dummy DIV and giving it the class colored. Then target it, and delete it.

Now there are three disctinct ways to target those shapes. Shape, Colored, or a specific color.

It's useful for a lot of things. Especially everyime you want to have a unique close or reset button for a series of popups or elements. This way, you can use combo classes to limit the effects of your interaction rather than only relying on Limit to siblings and Limiti to Nested, wich are only useful for a certain, imposed structure.

It's also useful to build app prototypes and have buttons targeting anything in the screen, without having to think it way ahead.

Now, without using this trick, almost anything is possible in targeting elements with interactions, but you have to think it before starting to build a structure and give class names to elements.

‍

Structure demo —

PerspectiveCascadeRotateFlatten
Check the Stucture demo
Check the staged demo
Check the demo site
This is the
Make
category
The Perfect Button
★
CSS Background animation
★
Affect any element with a combo class
★
Designing with multilayered fonts
★
Posts in other categories
2020 Webflow Features Wrap-up!
★
Design with HTML5 Semantic Elements
★
Master absolute positionning
★
Webflow secrets
★
Flexbox and the Grid
★
Most frequent solutions — Part 2
★
Floating Navbar item
★
Top 10 most frequent solutions
★
How to align DIVs
★
Multi lines message in forms
★
Follow me on Twitter
Webflow Designer profileMy Webflow Experts profileMy Behance portfolio

Read also

FIX
★
Most frequent solutions — Part 2
★
Floating Navbar item
★
Top 10 most frequent solutions
★
How to align DIVs
★
Multi lines message in forms
KNOW
★
Master absolute positionning
★
Webflow secrets
★
Flexbox and the Grid
MAKE
★
The Perfect Button
★
CSS Background animation
★
Affect any element with a combo class
★
Designing with multilayered fonts
I'm Vincent Bidaux, from the west coast of France, and Manifest.wf is where I blog about Webflow and web design.
I'm a Webflow Expert, Webflow Professional Partner and Community Leader. Hire me
Thank you for your interest!
Your message has been sent. You can also reach me on Twitter!

Oops!

I'm sorry, something went wrong while submitting the form. Can you please try to send your message again?
If you're attempting to send a message with multiple links, it's possible that it could be flagged as spam and blocked. To avoid this, try sending a shorter and more concise message. If that doesn't work, feel free to send me a private message on Twitter or contact me through my expert profile.
Reach me on TwitterReach me on Webflow Experts
Follow me on TwitterWebflow Designer ProfileI'm on BehanceI do photos and films