Updating a component variants with new properties in old projects

Hey there,

I’m in a situation where I want to update my existing components with the new variant properties (especially boolean and text). In my buttons, for example, it would make the variants drop from 264 to 120, which is a great improvement for maintainability.

However this component is already used in about twenty projects, with more than 840 instances overall. Publishing the changes will result in creating breaking changes if I delete the deprecated variants.

My question is: is there a smart way to do this (maybe more than just creating a “button v2” component)? Is it possible to automate a replacement, with some plugins or whatever, to make it work like “button primary with text and left icon will be now replaced by button primary with left icon boolean true and text boolean true” when updating the projects (more or less like we are prompted to do when opening a project with missing fonts)?

Thanks a lot :slight_smile:

Hey Jolirouge,

I’ve been trying to figure this out as well. Still haven’t find the right way, but I did saw this video today where Chad Bergman answers the question IF you should apply component props or not and how he would do it when existing variants are used in files.

Starts from 25:30 but the entire video is quite useful.

1 Like

Also seen a few people mentioning creating complete new components and later swap them with the old component in the design files. I’m afraid a big chunk still needs to be adjusted manually

1 Like

Yep that’s also what I’m doing at the moment but I’m meeting memory issues because i’m creating a loooot of “component xxx v2” in my library. That’s why I’m seeking for something lighter. I’ll check that video after work, thanks a lot :slight_smile: