Light Switch is a plugin for Sketch that provides actions to automatically convert symbols, text styles and layer styles to available light/dark alternatives.
- Download the latest release of the plugin
- Un-zip
- Double-click on Lightswitch.sketchplugin
- Run Sketch Runner
- Search Light Switch on the Install tab
- Click the Get button
To use Light Switch; select the layers you want to convert and run one of the commands below OR adjust the to customise the plugin's behaviour.
Menu Action | Shortcut | Description |
---|---|---|
Toggle Light Styles | ⌘ command + ⌥ option + k |
Switch selected layers to available light alternatives |
Toggle Dark Styles | ⌘ command + ⌥ option + l |
Switch selected layers to available dark alternatives |
Settings | Configure Light Switch plugin preferences |
Lightswitch takes the currently selected layers and then finds what Sketch Library they came from. If found, it then searches the library for an alternative for each Symbol
, Text Style
or Layer Style
.
For example running the command on a Library Symbol called...
Bars / Navigation Bar / iPhone - Compact / Light / Large Title
...would convert it into
Bars / Navigation Bar / iPhone - Compact / Dark / Large Title
It's important to note that with Symbols and Symbol Overrides, Light Switch will only work correctly if child layers match between light and dark components. Otherwise, Sketch will behave as usual and try and match overrides as best it can.
This plugin was created using skpm
. For a detailed explanation on how things work, checkout the skpm Readme.
If you have any suggestions on how to improve the plugin — feel free to get in touch.
- Message through Github [@TheBerriman] (https://github.com/TheBerriman)
- Message through Dribbble @SamBerriman