Skip to main content
Question

Component properties and variants don't work together?


Robert18

I found some people having similar problems, but i feel like i tried everything that was suggested in those topics and i can’t get it to work.

I have a navigation item with some elements:

  • Label
  • Icon
  • Notification badge

I want this item also to have a active/non-active state.

Now everything seems to go pretty well, untill i change the icon, then start switching between active/non-active. The icon now keeps the active state no matter what.

Here is a file:

Figma – 6 Jul 22

Anyone has an idea how to fix this in my structure?

2 replies

tank666
  • 4873 replies
  • July 6, 2022

To preserve color overrides, use the boolean union operation trick. See an example here: Vector fill color (nested component) doesn't change back to the one specified in the default variant after interaction - #12 by tank666.


Robert18
  • Author
  • 1 reply
  • July 8, 2022

Thank you tank666. Got it working now, still was a little confused after your example, but got it now.

These links also helped me understand it:

Figma – 19 Jun 22

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings