Skip to main content

Effect retains previous effect type's variable bindings (offsetX/offsetY/spread) after changing effect type: boundVariables contains keys invalid for the current type

  • August 15, 2026
  • 1 reply
  • 27 views

Lucas Braga

Summary

When a variable-bound effect has its type changed (e.g. from Drop Shadow to Glass), the variable bindings from the original type persist on the effect object, attached to fields the new effect type does not have. As a result, effect.boundVariables can contain keys that are not valid parameters of the effect's current type. This is exposed through the Plugin API and is visible in the node's serialized effect data.

Environment

  • Figma desktop, current release (observed August 2026)
  • Plugin API; also reflected in node.boundVariables.effects

Steps to reproduce

  1. Create a saved effect style for a Drop Shadow whose parameters are bound to variables - specifically color, offsetX, offsetY, radius (blur), and spread.
  2. Apply that effect style to a node.
  3. On that effect, change the effect type from Drop Shadow to Glass (which has no X/Y offset and no spread).
  4. Inspect the effect via the Plugin API: node.effects[0].boundVariables.

Expected

After the type change to Glass, boundVariables should contain only keys valid for a Glass effect (e.g. color, radius, and Glass-specific fields). Bindings for fields that Glass does not expose (offsetX, offsetY, spread) should be dropped, since those parameters no longer exist on the effect.

Actual

The Glass effect retains the shadow-era bindings. boundVariables reports:

{
color: VariableID:…/shadow/active/color
offsetX: VariableID:…/shadow/active/x
offsetY: VariableID:…/shadow/active/y
radius: VariableID:…/shadow/active/blur
spread: VariableID:…/shadow/active/spread
}

offsetX, offsetY, and spread are not parameters of a Glass effect and do not appear in the Glass effect UI, yet they remain bound in the data. The variable names themselves (…/shadow/active/x|y|blur|spread) confirm these are leftover shadow-token bindings clinging to an effect that can no longer use them.

Contrast (baseline that works correctly)

  • A freshly created Glass effect reports boundVariables: {} - correct.
  • The stale keys only appear after a type change from an effect that had those fields bound.

Impact

  • Plugins that read boundVariables to report or manage variable bindings must now defensively intersect the keys against the valid field set for the current effect.type, or they will surface bindings that don't correspond to any real, editable parameter.
  • These orphaned bindings appear to be inert (Glass ignores them), but they are dead weight in the file and are confusing to tooling and, potentially, to variable-usage/impact analysis.
  • It also raises a question about spread specifically, which is only valid on certain node types even for shadows; so stale spread bindings could compound existing validity constraints.

Suggested fix

On an effect type change, prune any boundVariables entries whose field is not a parameter of the new effect type (mirroring how the parameter values themselves are dropped/reset).

Notes

Happy to share full anonymized effect dumps (before/after the type change, plus the fresh-Glass baseline) if useful - they cleanly isolate the three states.

1 reply

adamsmasher
Figmate
  • Figmate
  • August 16, 2026

Hi, ​@Lucas Braga! This is a great write-up - thank you for taking the time to thoroughly document what you’ve found with variable bindings and changing effect type. 

 

Just to be super clear, this isn’t creating any downstream bugs or unintended effects for you - it’s more that the extra bindings should be removed as a best practice, right? I’m checking with our team on this one and will report back with any info I can share, or if they’d like additional information. Thanks for your patience!