When designing interfaces or websites that contain a lot of text layers, many of those layers will contain the same text properties. In Sketch, you can define a Text Style to apply to these layers, so you can update their style with ease. Ordinary shape layers have their own Layer Styles.
Text Styles exist on a per-document basis, but you can take advantage of Libraries to use your styles across all your documents.
Creating a Style
To create a Text Style, select a text layer, and choose Layer › Create new Text Style from the menu, or click the text that reads “No Text Style” in the Inspector and choose Create new Text Style from the menu.
Once selected, you’ll be prompted to give your text style a name before the style is created. You will then see the Inspector updates to show you the new Text Style created using the selected layer’s properties.
When you modify any part of the text’s style, such as the color, font, alignment, etc you will see an asterisk (*) appear next to the Text Style’s name. This means that the style has been modified and you can choose to update any other text layers who share the same style.
Clicking the style’s name in the Inspector will reveal a pop-up menu containing a couple of options;
- Update Text Style: Will apply the changes made to that layer to any other text layers using the same style
- Reset Text Style: Will remove the changes made to that layer’s style
- Create new Text Style: Will take the changes made, and apply those to a new style that can be applied to other text layers
- Detach from Text Style: Will keep the changes you’ve made to that layer but removes the Text Style attribute from the layer
Insert as New Layer
To apply an existing Text Style to a text layer, select it and click the “No Text Style” label in the Inspector to reveal a pop-up menu showing you the available Text Styles from your document, and from any enabled Libraries.
To insert a new text layer with a style already applied, choose Insert in the toolbar and in the pop-up menu, under Text Styles, choose the style from your document or Library. Then click the Canvas as if you were inserting any other text layer to insert it.
As well as living locally as part of your document, a Text Style can also belong to a Library. Please check out the Library Styles page to see how they work.