Join the Webstudio community

Updated last week

What's the best way to change a components styles on a specific page?

At a glance

The community member has a header component with a transparent background, and needs to change the styles (logo image and text color) when the header is placed on a page with a darker background image for better readability. The community member asks if there is a way to achieve something similar to Webflow's component variants. The comments suggest using local styles for style overrides in one particular instance, and that variants are not yet supported but can be achieved using additional tokens.

The answer provided is: "You want style overrides in one particular instance? Why not use local styles for that".

I have a header component, but need to change the styles of it (logo image and text color) because the background is transparent and when placed on a page that has a darker background image, I need the styles to be different for readability.
What's the best way to do this? Webflow has component variants. Is there a way to achieve something similar?
Marked as solution
You want style overrides in one particular instance? Why not use local styles for that
View full solution
O
B
D
3 comments
You want style overrides in one particular instance? Why not use local styles for that
Variants are not support yet (though on roadmap). For now you can achieve this by using additional tokens.
understood. I'll use the overrides for now. Thanks.
Add a reply
Sign up and join the conversation on Discord