Bolean for fills or colorstyles in a component

Hello,

I want to switch the background of all variants in a component (BG= multiple colors or background style) on or off.
With Variants (Fill = true or false) this is not possible.
Is that only possible via an instance swap?

Thanks a lot

I think the “cascading components” style combined with exposing properties may help. Basically, you create a component only for the background and use it every variant. When you change the fill of your background component, all variants will be updated (as long as you have not overridden the fill of the background component in a variant)

A similar approach is used in this file: https://www.figma.com/community/file/1263241930808853140/Component-Variance-Authority-(CVA)-Playground

2 Likes