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
- Select an instance or group of instances in Figma
- Open the Inspect tab
- Click the Swap button in the inspect panel
- The plugin scans the selected instance and shows:
- List of all bindings (variables and styles)
- Source (library collection)
- Target (local collection)
- Configure the mapping: which library token maps to which local one
- Choose the application scope:
- Single — only the selected instance
- All — all instances of this component on the page
- Click Apply
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.
Related sections
- Inspect Overview — general tab structure
- Rebind — replacing the main component
- Export Variables & Styles — exporting collections