Sketch Tutorial

How to create a Design System in Sketch (Part Five)

Here I’ll be diving into Nested Symbols and show you how to created fully featured Components for your Design System

Marc Andrew
Design + Sketch
Published in
10 min readFeb 20, 2018

--

🎁 Want to dramatically improve your Workflow with my Premium Design System for Sketch? You can pick up a copy of Cabana right here.

Use the offer code MEDIUM25 to receive 25% OFF.

Building out Components using Nested Symbols

In the previous articles I showed you how to build the foundations of what will become your Design System in Sketch, including the creation of base elements such as Colour and Typography, base Symbols such Icons and Text, and building out smaller Components to use in the system.

Now, in Part Four I only touched briefly on Components, and in Part Five I really wanted to dive a little deeper into building out fully featured Components with the power of Nested Symbols behind them.

Let’s dive on in…

Form Field (with Label & Message)

Ok, let me show you how I built out something which folks would class more as as a fully featured, all singing, all dancing, with added sprinkles Component.

And all with the power of Nested Symbols. Yeah we’re going 3 levels deep. Christopher Nolan would be so, so proud!

Well it’s a Form field to be exact, nothing too mind-blowing, but as I’ll show you, you will see how an assortment of smaller elements (Symbols) make up this one Component, and I’ll break it all down as we go along.

Let’s take a look see shall we…

So the finished Component as you can see here, is a simple Form Field, with a Label and Message…

Which I labelled in its final Symbol state as Input/Right Icon + Label + Message (rolls off the tongue I admit, but easier to find in the Symbol drop down later on, believe me).

And here you can see it in its untouched Symbol state, before the many Overrides available to it have been tweaked…

With the final Component made up of 3 separate Symbols…

  • Label
  • Input
  • Message

Ok. Let me show you how I put this Component together…

Input Symbol

Oh. The Label Symbol? Well this was simply a Text Symbol that I’d created previously, so we’ll come back to that one shortly.

The Input Symbol was comprised of 4 separate Symbols…

  • Cursor
  • Text
  • Icon
  • State

So firstly, I dropped in one of the State Symbols that I’d created before (you can read more about these in Part Three here).

Renamed the Layer simply to State, and resized it to 160x40.

I then inserted a Cursor Symbol I’d also created previously (this was simply a Shape Layer at 1x24 built off of a Fill Color Symbol. Nothing too over zealous.), renamed it simply to Cursor, and positioned it 8pts from the Left, Top & Bottom of the State Symbol.

For the Placeholder text I inserted one of my existing Text Symbols, and opted for the Light Grey color.

Renamed the Layer, and then positioned it accordingly.

Then I increased the Width of its Bounding Box so it was 40pts from the right edge of the State Symbol, this would also make it 8pts from the left edge of the Icon Symbol that I added next. You can see where I’m going right?

And finally I inserted one of my Icon Symbols, renamed it, and then positioned it 8pts from the Top, Bottom & Right edge of the State Symbol.

Then to finish things up, I selected all Layers, converted to a Symbol, and named it Input/Right Icon.

With my freshly made Symbol in place I then simply added some Resizing Constraints to finish things up.

For the Cursor, I pinned it to the Left Edge, and fixed the Width & Height…

For the Text, I pinned it to the Left Edge, and fixed the Height…

And for the Icon, I pinned it to the Right Edge, and fixed the Width & Height…

Message Symbol

The Message Symbol was comprised of an Icon, and Text Symbol. Dead simple.

Let me quickly show you how I put those elements together.

Firstly I inserted an Icon Symbol that I’d created previously, renamed it, and then Scaled it down to 16x16.

Then I added one of the Text Symbols, opting for a smaller text size here due to context it was to appear in.

I then renamed the Text Symbol, selected both Layers and converted to a Symbol, naming it Input/Message.

With my new Symbol at the ready, it was again, like I showed you before, a case of adjusting the Artboard size to snap to the Height of the Icon Symbol (16pt)

…adjusting the wording (via Overrides) of the Text Symbol, and adjusting the Artboard Width accordingly…

…then to finish things up, it was a simple case of adding in some Resizing Constraints.

For the Icon, I pinned it to the Top & Left Edges, and fixed the Width & Height…

And for the Text, I pinned it to the Top, Left & Right Edges…

So with the 3 Symbols at the ready…

  • Label
  • Input
  • Message

…we can Nest them to create one powerful Symbol, and in turn Component. Let’s piece them all together.

So firstly for the Label, I inserted a Text Symbol, again opting for a smaller text size, and renamed the Layer to Label.

I then inserted the Input Symbol, renamed it simply to Input, and placed this below the Label.

Then finally, inserted the Message Symbol, renamed to Message, and placed this below the Input.

I didn’t worry about alignment, and spacing just yet. That could all be dealt with once the 3 Symbols were packaged up into a fresh, new Symbol.

All I did do was make sure the Layers were organised in a logical way…

  • Label
  • Input
  • Message

Which in turn, places the Overrides in a more manageable order for you later on.

I then selected all 3 Symbols, and created a new Symbol.

With the final Symbol constructed (from the 3 Nested Symbols), it was just a case of, like before, doing a little Artboard resizing, adjusting resizing constraints, and other minor tweaks.

And it went a little something like this. Hit it…

Firstly, I resized the Artboard so it snapped to the Left and Right edges of the Input…

…then with the Input Symbol still selected, and using the Resizing Constraints, pinned it to All Edges.

And for the Label Symbol, increased its Width to the full width of the Artboard, and snapped it to the top edge.

Then adjusted the text Override to read Label, and then pinned it to the Top, Left & Right Edges, and Fixed the Height using the Resizing Constraints.

For the Message Symbol, and like the Label before, increased its Width to the full width of the Artboard, and then snapped it to the bottom edge.

I Then adjusted the text Override to read Message, and then pinned it to the Bottom, Left & Right Edges, and Fixed the Height using the Constraints.

The final thing to do was then simply align the elements vertically to one another using 8pts between each element, and re-adjusting the Artboard size if required.

With this Component finally constructed I now had an abundance of Overrides within easy reach…

…and this enabled me to customise with the greatest of ease when working my way through a project.

Oh. And before you go (and if you’re still with me), here’s a little added Bonus on how I constructed the Checkboxes, Radio Buttons and Toggle Switches in my Design System…

Checkbox

For the Checkboxes it was simply a case of bringing together 2 existing elements from inside of my System; Icon, and Text Symbols, creating the necessary Overrides, and then applying the required Resizing Constraints.

The 5 different States I was aiming for in Component form were the usual suspects…

  • Normal
  • Hover
  • Indeterminate
  • Checked
  • Disabled

Let me show you how I put the Checkbox together…

Firstly I referenced the Icon/Checkbox Symbols that I’d created before…

…and from those I inserted the Checkbox/Normal State.

I then referenced the Text Symbols I’d also created previously…

…and dropped in one of those…

I then renamed the Layers to something a little more manageable (Icon, and Text), selected both, and converted to a new Symbol (Input/Checkbox + Label).

Once I had this new Symbol up & ready, it was then a case of doing a lil’ bit of tweaking to get the sizing and spacing just right.

I adjusted the Artboard so it snapped to the height of the Icon Symbol (24pt)…

Then using the Overrides on the Text Symbol, renamed that to ‘Label’ and (once more calling upon the almighty power of Grayskull, I mean 8pt Grid System) positioned it 8pts to the right of the Icon, and then tweaked the Artboard width so the right edge snapped to the right edge of the Text Symbol…

Finally, to keep everything in happy resize mode moving forward, I pinned the Icon to the Top and Left Edge, and fixed the Width & Height.

And for the Text Symbol, pinned it to the Top, Left, and Right edges.

I now had a Checkbox Component that I could easily (with a number of Overrides at my disposal), adjust the States, edit the Text, resize with ease, and more…

Happy days!!

I then followed a very similar process for both the Radio Button, and Toggle Switch Components…

Choosing 4 States for the Radio Buttons…

  • Normal
  • Hover
  • Checked
  • Disabled

…and for the Toggle Switch…

  • Off
  • On
  • Disabled

I hope with this more in-depth look at Symbols inside of a Design System, in particular Nested Symbols (which have been known to frighten some folks when it comes to understanding how they function correctly), you now have a better understanding of how to build out fully-featured Components just ripe for customisation, and with the greatest of ease.

Don’t want to build a Design System yourself? You can pick up a copy of Cabana right here.

Use the offer code MEDIUM25 to receive 25% OFF.

Thanks for reading the article,

Marc

Designer, Author, Father and Lover of great sequels (Blade Runner 2049 I’m looking at you)

--

--

Marc Andrew
Design + Sketch

Creating designs with purpose for Health & Wellness brands. Let’s build something beautiful together at https://allyoucan.co/