Set BG-Color in Property Settings

Hi,

I was wondering, if there is a way to set the Background of a component, for example a button, dynamically through the Components Property Settings in the right panel.

I have multiple buttons on my site, an want them to have different BG-Colors. As they don’t differentiate in other styling I want to use a Component, instead of different classes.

I tried using Variables, but couldn’t find a solution.

Let me know, if you have additional questions :)

Emil


Here is my site Read-Only: Webflow - Emil's Dynamite Site

@The_Lovecats Hi Emil,

Yes that’s recently possible in Webflow! You can do it with the Custom Attribute. You can see my read-only link here where I demonstrate it: Webflow - Set BG-Color in Property Settings

Create combo classes for the different BG colours like is-red, is-green, etc. Remove them from your main component. Then in the button settings, go to custom attributes and add one with the name ‘class’. Then click the purple dot and create a new property called something like Colour. Now, when you add a new instance of your component, you will be able to add is-red or is-green to it.

Let me know if that all makes sense!

@The_Lovecats Were you able to get this working?