Swap it is a Sketch plugin that can be used to switch symbols across multiple artboards instantly. The plugin is designed to be flexible to enable swapping symbols such as:
- Light mode ↔ Dark mode
- Low fidelity ↔ High fidelity
- Default state ↔ Filled state
and more!
Swap It looks for symbols with a matching name across your linked libraries (or symbols within your document). For the plugin to pick up the corresponding symbol, they should have the same path name, with the modifier at the beginning or end of the name.
For example, to swap buttons between light and dark mode, the symbol names should be dark/button/default
& light/button/default
, or button/default/dark
& button/default/light
.
To use the plugin:
- Select one or more layers (or one or more artboards)
- From the menu, select Plugins → Swap It → Configure...
- Select whether the modifier is located at the beginning (e.g.
dark/....
) or end (.../dark
) of the symbol name - Enter the modifiers the plugin should find and replace (e.g. 'dark' & 'light'). Note these fields are case sensitive.
- (Optional) Select to use symbols located within the document (i.e. not in a library)
- Run the plugin!
Search for Swap It in Sketchrunner if you already have it installed.
- Download and open swap-it-sketch.zip
- Navigate to SwapIt.sketchplugin and copy/move to your plugins directory
To find your plugins directory:
- From the Sketch menu, navigate to Plugins → Manage Plugins...
- Select the gear in the lower left of the plugins window, and Select Reveal Plugins Folder
If you have any feedback or are encountering a problem, please open an issue here or fill out the feedback or report bug form.
Happy swapping! ✌️
Credits to Matt Curtis for MochaJSDelegate, and Nick Zdravkovski for the idea.