Inspect

Swap

Swap feature in SXL Studio: rebinding Figma variables and styles from library collections to local ones.

What is Swap

Swap rebinds Figma Variables and Styles on instances from one collection (usually from a library) to another (usually local). This is useful when working with component instances from a library and you want to switch all their variables to your local collections — for example, when localizing a design system or creating a library fork.

What gets rebound

  • Bound Variables — variables bound to fill, stroke, dimension, spacing properties, etc.
  • Paint Styles — fill styles (Fill Style ID)
  • Stroke Styles — stroke styles
  • Effect Styles — effect styles (shadows, blur)
  • Grid Styles — grid styles
  • Text Styles — text styles

How it works

  1. Select an instance or group of instances in Figma
  2. Open the Inspect tab
  3. Click the Swap button in the inspect panel
  4. The plugin scans the selected instance and shows:
    • List of all bindings (variables and styles)
    • Source (library collection)
    • Target (local collection)
  5. Configure the mapping: which library token maps to which local one
  6. Choose the application scope:
    • Single — only the selected instance
    • All — all instances of this component on the page
  7. Click Apply
Rebinding variables from a library collection to a local one

Mapping persistence

After applying Swap, the mapping is saved in the diff-id file. This means:

  • On the next export, the mapping will be reapplied automatically
  • No need to repeat the setup manually
  • The mapping is tied to the component name and its key

Usage example

You use a library called "Design System Core" with a "Colors" collection. In your file, you've created a local "Brand Colors" collection with the same variable names but different values. Swap lets you switch all instances to local colors in a single operation.