Skip to main content
Ben_Buckley
New Participant
Apr 3, 2024 2:31 PM UTC
Question

SVG line thickness not updating with variant

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
    Apr 5, 2024 2:36 PM UTC

    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
    New Participant
    Apr 8, 2024 10:48 AM UTC

    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
    Apr 11, 2024 7:50 AM UTC

    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
    New Participant
    Apr 11, 2024 8:53 AM UTC

    Thanks again for your reply

    Gayani_S
    Figmate
    Community Support
    Apr 11, 2024 12:48 PM UTC

    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!