Hello, I am new to Figma and I try to create a new plugin. One of the functionalities of the plugin is to switch the variant of a component. Is it possible via the API?
1 Like
In the API, each variant is simply a regular component. So to switch them, you simply need to change the mainComponent
of an instance to a different component. But you will lose all overrides.
1 Like