Skip to main content
Question

SVG line thickness not updating with variant


Ben_Buckley

Hi All,

My issue is with a component library ive created

The idea was to create a selection icons with different line thicknesses so when i have a nested component inside it. what ever icon i select, the line thickness will stay change to the variant ive created.

I was able to get it to work with some premade icons on https://feathericons.com/ but if i create one myself. either on Figma or illustrator. the line thickness wont carry over to the new icon ive chosen.

i thought it might be something to do with making it a compound path. mainly because the premade ones looked like one object in the Figma file viewer. instead of separate parts.

Hopefully my screenshot will illustrate what i mean.

FYI the building looking one is the premade and the X line thing is one ive made up in illustrator/Figma (same result)


This topic has been closed for replies.

5 replies

Gayani_S
Figmate
  • Community Support
  • 2078 replies
  • April 5, 2024

Hey @Ben_Buckley, thank you for reaching out and sharing screenshots!

So I might not follow completely. But I have tried to replicate this based on your text. I’ve created a component with variant which had different strokes. I was able to change the variant.

Please let me know what steps I am missing out.

Could you send me a screen recoding on what you’re seeing on your end when you mean “the line thickness wont carry over to the new icon I’ve chosen”.

Thank you in advance!


Ben_Buckley

Thank you for the reply. I was very confused about the issue i was running in to but it looks like ive figured it out myself.

Basically I needed to keep the vector name the same throughout all the icons i used. the component name could be different but the vector inside needed to be the same. otherwise the nested icon inside the component would not update.

ive made a little video illustrating what i mean.

Thanks


Gayani_S
Figmate
  • Community Support
  • 2078 replies
  • April 11, 2024

Hey @Ben_Buckley , glad that you’ve found a workaround here! And thank you so much for sharing a screen recording with me! I would like to ask the team internally is this behaviour is intended I am not very sure myself.


Ben_Buckley

Thanks again for your reply


Gayani_S
Figmate
  • Community Support
  • 2078 replies
  • April 11, 2024

No worries at all, the team confirmed that this looks like an expected behaviour.
Feel free to reach out if you have any further questions, happy to help out!


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