The power of symbols (updated)

Photo of Christian Krammer

by Christian Krammer on

Note: Symbols got a major overhaul with Sketch 3.7. So if you can’t see the functionality described below in Sketch yet, update to the latest version with “Sketch > Check For Updates...“ in the menu bar.


Think of Symbols as layer groups with super powers. You can duplicate or insert an instance of a Symbol as often as you want, but as soon as you change the “master” Symbol all of its instances get updated immediately. This applies to every change of such a group, be it its size, color, transformation or position of the nested layers. Symbols can not only be used for small elements like buttons or icons, but also for entire page elements like footers or even whole screens.

Animated screenshot of Sketch which Symbols in action

Creation

To create a Symbol select all the layers it should consist of and go to “Layer > Create Symbol” in the menu bar (or the same-named icon in the toolbar). This adds a little double-arrow to the name in the Layers List and creates an instance of the Symbol. The “master” Symbol is either sent to a dedicated “Symbols” page if you select “Send Symbol to ’Symbols’ page” or placed next to the instance (or its artboard) if you decide to leave this option alone.

Screenshot of Sketch which shows the Symbols creation dialog

The advantage of a dedicated “Symbols” page is that you have a separate location for all the Symbols created so far with all of them being nicely organized, however they may feel a bit unattached to the actual design this way. You can always drag the Symbols between the dedicated “Symbols” page (create one if there isn’t one yet) and the other pages from the Layers List.

Organization

Besides the dedicated “Symbols” page mentioned above all Symbols are also nicely organized in the menu bar under “Insert > Symbols”. For easier recognition you can put them into a folder here by including a slash “/” in their name. For example if you need an “active” and a “disabled” state in a folder called “buttons” you can use “buttons/active” for the name of one and “buttons/disabled” for the other.

Screenshot of Sketch which shows Symbols organized into folders

To add a new instance of a Symbol select it here or on the toolbar at “Insert > Symbol”, to change from one Symbol to another use the dropdown menu in the Inspector.

Screenshot of Sketch which shows how to swap Symbols in the Inspector

If you want to edit a Symbol make a double click on one of its instances and you are sent to the “master” Symbol with a handy “Back to Instance” link.

Screenshot of Sketch which shows the 'Back to Instance' link

Dealing with text and images

Every text and image element within a Symbol has a dedicated “Overrides” input field in the Inspector, which lets you have a different text value or image for each instance of the Symbol. This way you can have one Symbol for all the buttons in your design for example, but each of these buttons can have different text values.

Screenshot of Sketch which shows the text ’Overrides’ option

Nested Symbols

You can nest Symbols within Symbols as deep as you want. So you can have a Symbol for a screen, which contains a Symbol of the header and in this header you have another Symbol for an icon. To keep track of all this nesting you are presented with a “Return to Instance” link whenever you make a double-click on an instance to edit it. This link takes you back to the instance you just aimed to change.

Breaking Symbols

Lastly, if you have inserted an instance of a Symbol and decide that you don’t want it to be a Symbol anymore click on it with the right mouse button and select “Detach from Symbol”, which converts it back into a normal layer group. The same also happens if you remove the “master” Symbol with “Layer > Remove Symbol” in the menu bar.

oOo