Symbols can speed up your workflow by giving you a way to save and reuse common elements across your designs. When you make changes to a Symbol, those changes appear everywhere you use it in your designs. You can even create overrides for specific parts of individual Symbols.
Creating a Symbol
To create a Symbol, select a group, Artboard, or a selection of layers and choose Create Symbol in the toolbar, or choose Layer › Create Symbol in the menu. Give your Symbol a name and choose whether to send its master version to a separate Symbols page or keep it on the page you’re currently looking at.
Symbol Masters and Instances
When you create a Symbol, Sketch creates both a master and an instance of it. You can create as many instances of the same Symbol as you like, but you’ll only ever have one master. If you make a change to a master this will also show in any instances of that Symbol in your document.
If you choose Send Symbol to “Symbols” page, you’ll see a new page above the Layer List called Symbols. In here, you’ll find your master.
If you didn’t choose to send the Symbol to the Symbols page when you created it, it’ll appear on the current page as its own Artboard.
How to Turn a Symbol Back into Layers
To turn a Symbol back into regular layers, select the Symbol’s master in the Layer List and choose Layer > Convert Symbol to Artboard. Any instances related to it will become groups and editing the master will no longer change those instances.
How to Replace a Layer with a Symbol
When you’ve created a Symbol, you can insert in place of any existing layer in your design. To do this, control-click on a layer, choose Replace With, then choose a Symbol. The Symbol your choose will resize to fit the layer’s size.
There are two ways to access and insert your Symbols in Sketch.
You can insert symbols via the Components Panel to the left of the Canvas by clicking on Components at the top of the Layer List (you can also use Ctrl+1 and Ctrl+2 to toggle between the Components Panel and Layer List, respectively).
You’ll have the option to view “All” the Symbols available to you as well as Symbols belonging to just your document or a specific Library.
You can use the search bar at the bottom of the Components Panel to quickly find the Symbol you’re looking for and when you’ve found what you need, you can simply drag and drop that Symbol straight onto the Canvas.
Alternatively you can Insert a Symbol via Insert in the Toolbar or using the Insert Menu. From here you can view and choose from your document Symbols or Symbols belonging to any Libraries you have enabled.
There are two mains ways to edit a Symbol. You can edit the contents in the Symbol master, or you can edit individual instances with overrides.
How to Edit a Master Symbol
Find your Symbol master or double-click on any instance of it to go straight to it. Any edits you make to the master will sync to any instances of it in your design. When you’ve made your changes, choose Return to Instance to head back to the instance and see how your changes have synced across.
How to Edit Instances with Overrides
Select a Symbol instance and you’ll see an overrides section appear in the Inspector. By editing these overrides in the Inspector, you can change the content inside an individual Symbol instance without changing the master or affecting any other instance of it.
Note: You can also text Overrides for Symbol instances directly in the canvas.
How to Focus Overrides
Select your Symbol instance and hover over it to highlight any available overrides, click on any one of them to find it quickly and show it on its own in the Inspector. This is handy if you have a Symbol with lots of overrides (or nested overrides).
Alternatively, click the triangle next to the Symbol’s name in the Inspector and choose specific overrides there instead. You can also control-click on an override in the Layer List to see options related to it.
Note: Even when you’ve focussed in on a specific override, actions like moving or duplicating it will apply to the whole instance and not the specific override layer. You’ll need to use the Symbol master to change the override layer itself.
How to use Text Overrides
You can change the contents of text Overrides in a couple of ways. You can double-click on a text layer in a Symbol instance on the Canvas and type in new content, or type into the override field in the Inspector. Deleting anything in that field will change it back to the text in the Symbol master. You can also use the Data icon above the field to populate the override.
Note: If your override text is longer than what was originally in the Symbol master, Sketch will move any layers next to your text layer as it expands. If you want to fix layers and have text flow over them, you’ll need to lock them in the Symbol master.
How to use Image Overrides
You can override any image layer or shape with a fill in the Inspector. You can either drag in an image onto the preview, or choose Choose Image…. You can also use Data to populate image Overrides by clicking on the Data icon. To remove an image, click the image preview and press backspace.
How to Override Text and Layer Styles
How to Override Prototyping Hotspots
If you’ve added a Hotspot to your Symbols master as part of a prototype, you can override its target Artboard, or select None to disable it.
How to Hide and Show Overrides
Select your Symbol master and use the checkboxes next to each available Override in the Manage Overrides panel of in the Inspector to choose which ones are will be available when you select that Symbol’s instance anywhere in your design.
How to Reset Overrides
Select any instance and click the reset icon next to the Overrides panel title in the Inspector to remove and reset any Overrides you’ve applied to it.
How to Detach a Symbol Instance from a Master
To make edits to an individual Symbol instance without using Overrides, you’ll need to detach it from its Master by choosing Layer › Detach from Symbol from the menu. You can shortcut also Control-click on it and choose Detach from Symbol there. Holding down the Option-key changes the command to Detach all contents from Symbol which will convert the Symbol, and any nested Symbols it contains, to groups.
How to Swap Symbols
You can swap Symbols using the Components Popover in the Symbol panel in the Inspector. Choose a Symbol from the list or search for the Symbol you’re looking for and click to swap it with the currently selected Symbol.
How to Scale and Resize Symbols
You can scale and resize Symbols like any other layer or group, using the Scale command. Choose Layer › Transform › Scale… from the menu (or press ⌘ + K). Styles and properties like borders will increase or decrease in proportion with the Symbol itself, without affecting the master.
How to Create Symbol Groups
To group Symbols together in the Components Panel and Insert menu, name them using the format:
Group-name/Symbol-name. For example, two Symbols named
Button/Pressed will become part of a group named
Note: You will need to have two or more Symbols in a group before they’ll appear in their own submenu.
Organizing Symbols in the Components Panel
You can also organize your Symbols via the Components Panel. Just double click on any Symbol or group to rename it. You can drag and drop Symbols into an existing group or create a new group by simply dragging one Symbol on top of another.
Symbols in the Components Panel are ordered alphabetically.
Using the Symbols Page
Sending Symbol masters to the Symbols page can help keep things organized, especially with complex designs. It also helps to reduce confusion between using a Symbol master or instance.
To manually move a Symbol master, drag it onto the Symbols page title in the Layer List, or control-click on it and choose Send to “Symbols” Page.
Creating Nested Symbols
To create a nested Symbol, insert a Symbol instance into a Symbol master on the Symbols page. Now, when you edit that Symbol instance’s master, it’ll update anywhere, including the instances that are inside other Symbol masters.
You can also create nested Symbols by selecting two or more Symbol instances and choosing Create Symbol in the toolbar.
Note: There’s no limit to how many symbols you can nest within each other, but you can’t use an instance of a Symbol inside its own master.
How to Use Nested Symbol Overrides
To use nested symbols so that they appear as Overrides, you’ll need to have two or more Symbol masters that are the same size and use one of these as a nested Symbol.
When you select a Symbol instance in your design, you’ll see options to swap out nested Symbols with any other Symbol that’s the same size. This is useful in a menu, for example, when you have buttons in a menu with active and inactive states.
To quickly access the master Symbol for one of the nested Overrides, click the arrow icon next to the nested Symbol Override’s name in the Inspector.
Resizing Symbols with Smart Layout
Smart Layout maintains the padding and spacing between layers in a Symbol when an override changes its size. Once you’ve set up Smart Layout, changing an override in a Symbol’s instance will resize it automatically.
To use Smart Layout, simply create a symbol and give it either horizontal or vertical layout. When you create an instance of that Symbol and edit its overrides, Smart Layout will use the spacing and padding between layers in the Symbol master as a blueprint and keep them consistent in your instance as it resizes.
How to use Smart Layout with Symbols
You can set Smart Layout properties in the Inspector (when you edit an existing Symbol master) or when you create a new Symbol.
To use Smart Layout with an existing Symbol, head to its master (you can get there quickly by selecting any instance of that Symbol and pressing Enter on your keyboard) and choose how you’d like Smart Layout to resize it under the Layout panel in the Inspector.
As well as choosing whether your Symbol resizes horizontally or vertically, you’ll need to set which direction it resizes from (think of it a bit like text alignment). You can choose from the following layout properties:
- Top to Bottom
- Bottom to Top
- From Middle
- Left to Right
- Right to Left
- From Center
When you create a new Symbol, you’ll be able set these properties using the drop-down menu underneath the name field in the Create New Symbol sheet.
Note: When you apply Smart Layout properties to a Symbol with text layers, you’ll need to make sure they’re set to either auto height (for vertical layouts) or auto width (for horizontal layouts). Smart Layout compares the dimensions of the text layer in the Symbol master to the one in the instance to work out how the other layers in the Symbol should resize, so fixed size text layers will not work as they always stay the same.
When you give a Symbol Smart Layout properties, you’ll see a new icon next to its name in the Layer List showing its layout direction.
If you change the layout of a Symbol master when it already had Smart Layout properties set up, instances of that Symbol may look wrong. To fix this, try clicking the Shrink instance to fit content button that appears under the Overrides panel in the Inspector.
Note: You can still apply Resizing Constraints to layers within a Symbol that has Smart Layout properties. This is handy if you want a specific layer to ignore the layout settings you’ve given the Symbol it’s a part of. For example, you can use Resizing Constraints to fix a layer’s size and stop it from resizing with a Symbol instance that has a horizontal or vertical layout.
How to use multiple Smart Layout properties within a Symbol
For more complex UI components, you might want to include a horizontal layout within a vertical layout (or vice versa), like the example below. For this, you can apply Smart Layout properties to groups within a Symbol master to have different sets of layers resize in different directions.
To do this, open up the Symbol master, select the objects that you want to resize in a different direction, and group them. Now you can apply a separate set of Smart Layout properties to that group under the Layout panel in the Inspector. Like Symbols themselves, you’ll see a new group icon in the Layer List showing you their layout direction.
If you have a Symbol where one of its layers dictates that Symbol’s minimum height (like the image in this card example below), applying an override to a shorter text layer next to it would cause the Symbol to resize with unnecessary padding. If that’s the case, you’ll need to group the text layer(s) and the layer that dictates the Symbol’s minimum height together in the Symbol master. Once that’s done, you’ll be able override the text layer and Smart Layout will know not to increase the overall Symbol height until the text passes its minimum height.
How to use Smart Layout with hidden Symbols
Smart Layout doesn’t just work when overrides change the size of a Symbol instance, it also works when you hide a Symbol. For this to work, you’ll need a set of nested Symbols that follow the direction of the Symbol master’s layout (a row of buttons in a menu with a horizontal layout, for example). Hiding one of those Symbols via the Overrides panel will cause the others to move up and fill the empty spot. This even works for Symbols of different heights and widths.