Sketch Workflow — Atomic Symbols
Sketch released a huge update with the way symbols are handled in 3.7. While I believe symbols still have a long way to go. Nested symbols have opened up new possibilities, and have me rethinking my current workflow.
Thinking like a developer
I’m not going to debate whether you should code or not, but we can learn a lot from developers. And unless you are just making dribbble shots, you are going to hand your work over to be built sooner or later. There are also some great principles we can learn from the development process.
D.R.Y — Don’t Repeat Yourself. The idea here is to create reusable components. And what better way to do that in Sketch is with Symbols and Shared Styles. We can also apply this to a bigger picture, and try to avoid reinventing the wheel every time a new feature comes a long. Go back into your component library and see if something can be reused.
Brad Frost, coined the Atomic Design Methodology. The idea is to create small reusable elements that can be combined together to form a larger component.
In the natural world, atomic elements combine together to form molecules. These molecules can combine further to form relatively complex organisms.
With the new nested symbols we can use a similar methodology, to streamline our design process.
In my last article we built a single symbol for a list element. If we consider this list element an organism, it can be broken down into smaller molecules and atoms, that can be reused in different variations of our list elements.
For the purpose of this tutorial we are going to built a two line list element with a primary icon on the left and a secondary icon on the right.
If atoms are our smallest building block, lets consider individual layers our atoms. We can apply layer and text styles to our atoms. In our case we can create a layer style for the Title, Subtitle, and the Bottom Border.
In chemistry, molecules are groups of atoms bonded together that resultantly take on new properties. In interfaces, molecules are relatively simple groups of UI elements functioning together as a unit. - Brad Frost
Lets create a Molecule for our Text, this symbol will contain our Title, and Subtitle as well as any metrics that go along with this component.
We have a lot going on here so let’s break it down.
Our text will be indented 72px from the left side of the list element
We baseline our text to a 4pt grid.
Make sure our text group is vertically centered within our list element.
And lastly we are going to create a max width for our symbol. I chose to make it 75% of the width of the screen. The reason for the is because, for better or worse text does not overflow the symbol bounding box in 3.7
Hide your guides and create your first Molecule Symbol! Name it List Element / Component / Two Line Text. We will group all of our molecules in Component.
Now we will create an Icon Molecule, Lets place a 24pt icon inside of a 40pt circle with a 16pt margin to the left.
Create a symbol for the icon molecule called ‘List Element / Component / Primary Icon’.
We need one more 24pt secondary icon on the right side of the list element.
We now have an organism! Create a Symbol for the entire List element called ‘List Element / iPhone 6 / Two Line with Icon’
And we have a list!
What’s the point?
Ok that was a lot of extra work to create a basic list. But this is where the magic happens! Did you catch the ‘iPhone 6’ in our Symbol name?
Since our list element organism is really just a container which contains some molecules. We can create variations of that organism with the same molecules.
Hopefully one day we will get constraint based/resizable symbols but for now we are stuck with fixed sizes. As an example we will create an iPhone 6 plus variation of out element.
Create a 6 plus artboard
Drop one of symbols on the 6+, and ‘Detach from Symbol’
Now we need to adjust the width of the list element to fit the 6+. We just need to fix the guides, slide the secondary icon over. and adjust the width of the bottom border layer.
Now create a new organism and name it ‘List Element / iPhone 6+ / Two Line with Icon’
So now we have two nice looking lists!
The Magic 🎩
Now that we have two variations of the same list element. That share all of the same nested symbols. We can make global changes by simply editing any of the nested components or layer styles.
Let’s say we want to remove the circle from the primary icon, all we have to do is edit one symbol, and the change is made across both screens.
Creating screen size variations, is a very basic example. Hopefully this workflow will encourage you to think a little differently about how you use symbols.
As alway I would love to hear your thought, comment or hit me up on twitter @checkyourvector