🎁 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.
Creating the Shapes & States 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 and then onto the base Symbols such Icons and Text which can then be implemented into countless other Symbols as you move forward.
In this part I want to show you how I created the final base Symbols of my Design System, and I’ll give you some insight into the creation of my Button & Input States, as well as Button & Input Shapes. These power such a large percentage of the subsequent Symbols you create inside of a Design System, so it’s good to get them into place as early as possible.
Please note: Like I mentioned in the previous article, I won’t be showing you how to build out hundreds of Symbols. I’ll just be giving you a brief insight into some of the key elements here.
Let’s dive on in…
For the Button States I drew out a Rectangle (R) around 190x50px (this is just dimensions I opted for, feel free to choose your own).
And then gave it a Fill Color of #E9E9E9 (You could also simply copy across the Hex value from the Light Grey we created in Part One. Entirely up to you).
I then created a new Shared Style and labelled it Button State/Disabled.
I renamed the Layer to Base, and then converted it to a Symbol with the label State/Button/Disabled.
I then repeated a similar process for the Hover and Normal Button States (creating a new shape, a new Shared Style, and then a new Symbol), but chose a White Fill Color for the Hover and Normal States, with the Hover State at White with 25% Opacity and the Normal with White at 0% Opacity.
I now had the Button States in place, and which I could now call upon, when building out my Button Components, which we’ll touch upon in the final part of the series.
Quick Tip: When creating Symbol Overrides. Make sure that if you want a certain set of Symbols to appear in an Override (ie; Disabled, Hover, Normal) that they are exactly the same dimensions. One pixel out and they just won’t appear in the Override dropdown. Not cool. So show those pixels some love!
Button Shape (Fill)
For the first of the Button Shape (Fill) Symbols I drew out a Rectangle (R) 120x40px and then renamed the Layer to Base.
I then dropped in both the Colour Symbol and the State Symbols I had created previously.
I chose the Primary colour, and Normal State Symbols (Color/Primary and State/Button/Normal).
Resized both of the elements to the same as the Base Layer, and then aligned them over the top.
Finally, I created a Mask on the Base Layer, shortened the Layer Names (ie; Colour & State), and then, with all the Layers selected, converted to a Symbol with the label Shape/Fill/Radius — 0px.
I then followed the same procedure for a Button Shape (Fill) with a 4px Radius and a 100px Radius, adjusting the shape layer accordingly.
I now had a Symbol form which I could simply Override both its State, and Colour from the Inspector .
Button Shape (Border)
Now the Button Shape Border Symbols took a little more time (not as simple as popping in the Border Shared Style), and a little bit of tweaking for them to play ball. Let me show you the method that (eventually) worked for me…
Firstly I created a Rectangle (R), the same dimensions as the Button Shape (Fill) Symbols; 120x40px.
Then I duplicated this layer (CMD + D) and aligned them atop one another.
With the top layer selected, I reduced its size down to 118x38px and then moved it 1px down, and 1px to the left, until I had something like the following…
I then selected both shape layers and used Subtract, and then renamed the Combined Shape layer to Base.
I then inserted the Color/Primary, and State/Button/Normal Symbols resized them accordingly, placed them over the top of the shape layers, and then created a Mask from the Base Layer.
Finally I selected all Layers and Symbols and converted to a new Symbol with the label Shape/Border/Radius — 0px.
I then followed the same procedure for a Button Shape (Border) with a 4px Radius and a 100px Radius, adjusting the shape layer accordingly.
With the Input States I followed a slightly different procedure to the Button Shape (Fill & Border) Symbols, even though they were both following quite a similar structure.
My reasoning behind this was that I believe Form Input styles should follow a more structured path, and that you should not go too much off base when working on the colours for Inputs. Stick to certain colours (Primary, Default, Error, Success) when building Input States, whereas with buttons allow yourself a little more freedom in the colour department.
That’s why I built the Symbols for the Button Shapes and the Input States a little differently. Let me show you what I mean…
Starting with the Default Input States, I created a Rectangle (R) 180x50px and applied the Border/Light Grey Shared Style I had created previously.
I then converted this to a Symbol with the label State/Input/Default/Radius — 0px.
Then following similar steps, I created Symbols with the same Shared Style, but with a 4px and 100px Radius.
Then, calling upon the other Border Shared Styles I had created previously (ie; Primary, Grey, Error, Success), created Input Symbols for the following states…
- State/Input/Active/Radius (0, 4px, and 100px)
- State/Input/Disabled/Radius (0, 4px, and 100px) I used a Grey Fill Colour here with an Opacity of 40%, and then created a Mask with the Border Layer
- State/Input/Error/Radius (0, 4px, and 100px)
- State/Input/Success/Radius (0, 4px, and 100px)
In the 4th part of this Mini-Series I’ll be showing you how to put the various Symbols (Icons, Text Symbols, States and Inputs) together to build out some fully featured Components. Oh yes indeed!
Join me for Part 4 (which you can check out here)
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,
Designer, Author, Father and Lover of (good) Star Wars films (does not include The Last Jedi)