A Case for Iconfonts in Sketch

✋ I KNOW, I KNOW Iconfonts aren’t cool anymore, but hear me out.

Image for post
Image for post
Back from the dead.

Sketch’s symbols are getting better with every update, but they still have their limitations. Text overrides are great, and I think we are all hoping for a similar functionality for layer properties and assets that live inside of the symbol. In the meantime here is a little trick I use.

Text Overrides + Iconfonts = Dynamic Icons

It’s a bit of a hack but we can actually take advantage of text overrides and iconfonts to swap out icons on the fly within symbols.

Image for post
Image for post

Here is a typical symbol for a list item, text overrides give us the ability to swap out the text, but you can not change any other elements within the symbol.

Image for post
Image for post

If we swap out the vector icon for text fields we can use an iconfont in the override field.

For this example I am using the Material Design Iconfont, which I have installed locally. Material icons are great because they are pixel fitted to whatever font size you select, and their character code is the actual icon name. They also have a big selection that is great for quick mockups.

Image for post
Image for post

The actual font can be downloaded here:

Start by defining the location of your icon within the symbol, we will use a 24x24 box.

Image for post
Image for post

Add a new textfield, and set the text to ‘folder’ for now.

Image for post
Image for post

Set Typeface to Material Icons, Size to 24, center align and set Width to Fixed.

Image for post
Image for post

💥 Boom, We have an icon! Be sure to align the bounding box to your guide.

Image for post
Image for post

You can change the name of the text layer to “Primary Icon”, so text override field is named correctly

Image for post
Image for post

Now if we go back to our artboard we can see a new override field for the icon.

Image for post
Image for post
Image for post
Image for post

Note: If you are using a font other than the material design font you can copy and paste from fontbook. It will not show up correctly in the preview field, but it will work in the symbol.

Image for post
Image for post

🔥 Taking it a step further — Data Populators!

Ok so that was cool, but what else can we do?

With a little JSON and The Invision Craft plugin we can design with data.

Image for post
Image for post

Map your data within the symbol.

Image for post
Image for post

Now go back to your artboard and use the Craft Duplicate tool.

Image for post
Image for post

Conclusion

The purpose of this article is not to promote the use of iconfonts in your final product. But to simply speed up your design workflow. It’s a great way to add more fidelity to your wireframes and mockups.

⚠️ Notes:

  • If you are sharing your files with other designers, they will also need the font files installed locally as well.
  • If you hand off your sketch files to Devs, or use an app like zeplin. Be sure to explain the iconfont is for mockups only.

💎 Source Files

http://nudg.it/assets/sketch-iconfonts.zip

Design + Sketch

The best collection of articles, tips, tutorials, and…

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store