- Is there a method to remove variable bindings without recreating styles?
- Can textStyle.setBoundVariable(propertyName, null) work for unbinding?
- Any plans to implement proper unbinding functionality?
We’ve needed that in my team and had to buy a variable cleaning plugin and go over every file manually. I know of other teams that have had the issue, from discussing with a Figma advocate. Having an API option to clean up those untethered variables would be a game changer.
We’ve needed that in my team and had to buy a variable cleaning plugin and go over every file manually. I know of other teams that have had the issue, from discussing with a Figma advocate. Having an API option to clean up those untethered variables would be a game changer.
Hi and thanks for your reply!
So, you paid for a plugin that at the end couldn’t do the job, am I right? Do you remember the plugin’s name?
I did look for some plugins but they essentially detach all variable or style from a selected frame or layer, and that’s not what I’m looking for to develop. I’m talking about variable tokens that are apply with relative values, to other “Local styles”, so they’re not actually applied to a frame but they could recall tokens, from variables from collections, which are not available anymore.
Probably it’s the same use-case you’re having.
This is important for maintaining design system integrity! Unfortunately, unbinding without recreating styles isn’t natively supported yet. setBoundVariable(propertyName, null) might work, but an official unbinding method would be ideal—hopefully, Figma adds support soon!
Hi from Figma! Thanks so much for reaching out with your questions! Hope these answers help!
- Unfortunately, this is not possible. A subscribed/library style is immutable and there is no way to modify to remove variable references without recreating the style. If there is a style with missing or dangling references, the style should be fixed/republished from the source file itself. Once the style is updated, you will have to manually accept those updates in the relevant files.
- This will work for local styles! It will not work for subscribed styles though because those cannot be modified.
- There are no plans at this point to update the API, but we will track this in our backlog for future improvements.

Hi
I believe this answer has gone beyond my expectations and requests. I would tend to develop a plugin that can automatically do the "Detach Variable" (the icon with the broke chain) which is currently only manual for those tokens references that are no longer available, as in the case highlighted.
So far with my plugin and Figma’s API, I have succeeded to find the styles that have tokens that recall variables no longer available, what I miss is that functionality of "Detach Variable" maintaining the value that was once assigned, which is exactly what happens by doing that detach manually.
Hi Mastro!
Thanks for your response. It would be helpful to get an example to better assist you. If you’re talking about subscribed styles, the style edit modal (and the detach buttons associated with it) isn't available in the UI anyway.
Thanks!
Hi Mastro!
Thanks for your response. It would be helpful to get an example to better assist you. If you’re talking about subscribed styles, the style edit modal (and the detach buttons associated with it) isn't available in the UI anyway.
Thanks!
Correct I’m talking about that modal that opens to edit a style. What you mean by “isn’t available in the UI anyway”, that is not possible to access to those options via API?
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.