<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Niels Flindt Koelmeyer on Medium]]></title>
        <description><![CDATA[Stories by Niels Flindt Koelmeyer on Medium]]></description>
        <link>https://medium.com/@nielsflindtkoelmeyer?source=rss-9c840ad8523f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*0ikGvqY1OVInH8vkY7jwKg.png</url>
            <title>Stories by Niels Flindt Koelmeyer on Medium</title>
            <link>https://medium.com/@nielsflindtkoelmeyer?source=rss-9c840ad8523f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 10:37:51 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@nielsflindtkoelmeyer/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Nested Button Symbols: The Complete Guide]]></title>
            <link>https://blog.prototypr.io/nested-button-symbols-the-complete-guide-c0c91be46952?source=rss-9c840ad8523f------2</link>
            <guid isPermaLink="false">https://medium.com/p/c0c91be46952</guid>
            <category><![CDATA[sketch]]></category>
            <category><![CDATA[ux]]></category>
            <category><![CDATA[ui]]></category>
            <category><![CDATA[design]]></category>
            <dc:creator><![CDATA[Niels Flindt Koelmeyer]]></dc:creator>
            <pubDate>Wed, 19 Apr 2017 20:47:58 GMT</pubDate>
            <atom:updated>2017-04-24T10:01:50.136Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*irZxU2hhZZcs66dapVnIIQ.png" /></figure><h3>Introduction</h3><p>Using Nested Symbols in Sketch is powerful because it gives you the ability to manage your symbols across an indefinite number of artboards from a single source. The beauty of using Nested Symbols is that you define your components in one place only. This makes consistency and maintainability easier to manage. Especially when you work on large projects. Also, using Nested Symbols it’s quicker to swap out individual Symbols (eg. colors or states) for any given instance of a Nested Symbol.</p><p>Effectively working with this technique has been brilliantly laid out in <a href="https://medium.com/u/8cebe625c432">Jon Moore</a>’s in <a href="https://medium.com/ux-power-tools/a-better-way-to-make-buttons-in-sketch-6c23470f27c">Nested Button Symbols</a>. What we want to do in this tutorial is to expand upon Mr. Moore’s technique by adding the ability to control shadow effects on any given button.</p><p><strong>Note</strong>: <em>Setting up the Nested Button Symbol does require some initial, tedious footwork. Likewise, it requires a huge amount of organization. Once you got the base down, though, it’s super fast to expand upon, adjust and maintain. For those of you who can’t be bothered doing the prep, just skip to the bottom and grab the premade Sketch-file. For the rest of you, come take my hand and follow along.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9Ogtix6L8DeFRi6sDDT2ug.gif" /><figcaption>What we’re going for</figcaption></figure><h3>How to Get It: 6 Types of Symbols</h3><p>In order to make a Nested Button Symbol that allows us to toggle between different expressions of the Button, we’ll initially need 6 roots of Symbols (I call these Root Symbols). Well, technically the Container-layer won’t be turned into a symbol, but it will get included in the Nested Button Symbol.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*ahSrylF2SZ_Lz4rRu6DFig.png" /><figcaption>Anatomy of a Nested Button Symbol</figcaption></figure><p>When we want to add variations of a given root Symbol (say, we want a new color variation), we simply add duplicates of the layer and edit them.</p><p>The way to go about making Nested Symbols is to sketch out the base layers for the button. We want to start from the simplest form possible of the button first and then add complexity as we progress. Let’s go!</p><h3>Part I: Prepare the Base Layers</h3><h4>Text and the Container</h4><p>Roughly speaking, a button is really just some text bounded by a container — so we’ll start from here: Add a centered text layer and a rectangle to act as our container. Think of the container as a cookie cutter. It’s sole function is to give shape to the layers on top of it. So the color of the container doesn’t matter because it’ll be covered by other layers anyway.</p><p>Align those two layers and we got ourselves a button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/650/1*TO-txuPEC6hihp7goOYFsA.gif" /><figcaption>Boom!</figcaption></figure><h4>Color</h4><p>This step is easy. Simply duplicate your container (cmd+D) and fill it with your primary color of choice.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*0APzS3jELynqwBdqsvK3_g.png" /></figure><h4>Inner Shadow and State</h4><p>Okay, now we want to add a state to our button. When starting to think about the different states a button might have, it’s useful to have a predetermined set of rules (like a style guide or framework) to base your design on.</p><p>We’ll use the rule of <em>Light Comes from the Sky </em>as explained in <a href="https://medium.com/u/a25a101a5693">Erik D. Kennedy</a>’s excellent post <a href="https://medium.com/@erikdkennedy/7-rules-for-creating-gorgeous-ui-part-1-559d4e805cda">7 Rules for Creating Gorgeous UI</a>.</p><p>Simply put, because light hits the Interface from above — “the sky” — , Inset elements (such as pressed buttons) catch less light and will therefore appear darker as well as they’ll have an inner shadow casted from their top edge. Reversely, Outset elements (eg. buttons and hovering buttons), catch the more light and will therefore appear lighter and will cast a shadow from the bottom edge on the interface below them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8PZ_jB_0ZnZ9SfnkupDhnQ.png" /><figcaption>Something like this</figcaption></figure><p>Now, what’s the simplest interaction for a button? Well… It can be clicked/pressed. So let’s start with a <em>Pressed State</em> for the button. Since pressed buttons are inset into the interface, we want the layers beneath it to appear darker. To achieves this effect, we duplicate our color layer and change the fill to black with an opacity of 20%.</p><p>Next, we want an inner shadow. Duplicate the Pressed State layer, remove its fill and give it an inner shadow from the Inspector in Sketch.</p><p>We should see something like this now:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*QemKEyF6FrIWHdZOTm2VMQ.png" /></figure><p><em>The reason why we’re making separate Symbols for States and Inner Shadows is that it gives us the flexibility to reuse the individual Root Symbols across multiple components, such as Radio buttons, Checkboxes, Slider Tracks and Slider Buttons.</em></p><h4>Shadow</h4><p>Finally, we want to add a shadow layer. It’s somewhat contradictory to add a shadow to an inset element, but we want to include the shadow in the Nested Button Symbol from the beginning.</p><p>The shadow will be placed at the bottom of the layer hierarchy. Simply duplicate the Container and place the shadow beneath it. Remove the fill and give it a shadow.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*2jHX514clbo0KSOLk7Hfxg.png" /><figcaption>Hierarchy of layers</figcaption></figure><h3>Part II: Organizing the Base Layers</h3><p>Alright, we’re done Sketching for now. Good job! Let’s organize the layers on our artboard so we can make sense of it all. We start by naming each layer according to its functionality.</p><h4><strong>Naming the Layers</strong></h4><p>I like to use emojis when naming the layers (again with inspiration from <a href="https://medium.com/u/8cebe625c432">Jon Moore</a>) to declare their root. Using visual cues makes it so much quicker to scan and find the symbols you want to edit, especially as your project grows in complexity.</p><p>So go ahead and hit <strong><em>control + command + space</em></strong><em> </em>and choose the ones you like for each element. I named the layers like so:</p><ol><li>🖋 Text</li><li>🔦 Inner Shadow</li><li>⚡️ State</li><li>🎨 Color</li><li>📦 Container</li><li>☀️ Shadow</li></ol><p>Using emojis is a personal choice. Feel free to leave out the icons. The key takeaway is that being <strong>clear and consistent</strong> in your naming will help you later down the line.</p><h4>Sizing the Layers</h4><p>It’s important to know that Sketch only lets us swap out Symbols of the <strong>exact same size</strong>. So far we’ve worked with duplicate layers of equal size (except for the text-layer of course). If we just went ahead and turned our layers into symbols now, that would mean we had to</p><p>Because we don’t want to be presented irrelevant Symbols, we’ll give each layer a <strong>unique width</strong>. After we’ve turned them into symbols, we’ll readjust their sizes in our Nested Button Symbol.</p><p>Since the Container is the cookie cutter, we’ll resize the other elements relative to it. I like to start from the bottom up, decreasing each layer 1px in width relative to the container. We’ll maintain the height values, as this makes it easier for us to readjust them on the Symbol Page.</p><p>In my case, the container is 123px wide, so I’ll adjust each layer’s width like so:</p><ol><li>🖋 Text</li><li>🔦 Inner Shadow -4px<strong> </strong>= <strong>119px</strong></li><li>⚡️ State -3px<strong> </strong>= <strong>120px</strong></li><li>🎨 Color -2px<strong> </strong>= <strong>121px</strong></li><li>📦 Container = <strong>123px</strong></li><li>☀️ Shadow -1px<strong> </strong>= <strong>122px</strong></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*3s5Tw7h80OUfe81IkE83KA.png" /><figcaption>A necessary evil</figcaption></figure><h3>Step 6: Nesting the Symbols</h3><p>Now that we’ve created our base layers, named and sized them, we can (finally!) start turning them into symbols, <strong>leaving out only</strong> the “📦 Container” which will act as a mask (Sketch doesn’t allow for symbols to function as masks). Speaking of ‘mask’, let’s make the container a mask already — select the layer and hit <strong>control+cmd+M.</strong></p><p>Cool, go ahead and turn the remaining layers into symbols: Select the layers individually and hit “Create Symbol” item in the toolbar, or choose “Layer › Create Symbol” in the menu.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*amMzzgm1Ag4AHXolF1-VUQ.gif" /><figcaption>The birth of a Nested Symbol. Isn’t it beautiful?</figcaption></figure><p>As it’s already clear from the Inspector, we can now to toggle states. To try play around with the symbols, and see how it works.</p><h3>Step 7: Resizing the Symbols</h3><p>Done playing? Nice. Let’s adjust the size of the symbols in the “Button/Straight” to get a coherent button. Jump to the Symbols.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uJLsW5JuEeCW9VVHIGrbKw.png" /></figure><p>Okay, now give the symbols the same size in the Nested Button Symbol to iron out the short right sides. In this example, I give all the rectangular layers the same width as the container.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u1nVJDjS8zIonroakaSI7A.gif" /></figure><p>For the 🖋 Text Symbol, we’ll give a resizing property of “Resize Object”, meaning if change the size of the Nested Button Symbol, the text will keep it’s position and adjust accordingly</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*g86KeMl9rrER1PlT4Uaufg.png" /></figure><h3>Part III: Adding variations of the Root Nested Symbols</h3><p>We want our Nested Button Symbol to be more versatile than what we’ve got already. The way we go about this is to clone the Symbols we made and then manipulate them as we please. For each new variation, we add of a Root Symbol, we’ll follow the same pattern:</p><ul><li>Duplicate</li><li>Edit</li><li>Name</li></ul><p>It’ll make sense once we start adding variations of each symbol. Let’s begin with the color variations.</p><h4>🎨 <strong>Color Variations</strong></h4><p>For this example, we want three colors— primary (which we already made), secondary and tertiary. Really, the number of colors doesn’t matter. We could make 1 to a million different colors just by duplicating our base color symbol.</p><p>On the Symbols page, select the “ 🎨 Color Symbol” and make 2 duplicates and give them colors of your choice.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*faO_sJ01SRRvBK7I74L3RQ.png" /></figure><p>Notice how the “🎨 Color Symbols” are named? We are using the Root name, followed by a slash (“/”) and then the name of the instance. <strong>Pay attention to the slash</strong>. It’s a naming convention we’ll be using from this point on. The reason why is that the “/” is effectively organizing the Symbols into categories. This will be clear when we acces the Symbols list.</p><p>Neglecting to categorize your Symbols in a consistent manner will quickly make them confusing to work with. We don’t want that. On that note, Sketch is super unforgiving when it comes to naming: The slightest deviation from the naming convention eg. an extra space between icon and root name, will be treated as two separate categories.</p><p>If you want, you can go back to the artboard and toggle the colors of the button to see if everything’s working as intended.</p><h4>⚡ ️State Variations</h4><p>Alright, let’s add some ability toggle the states of the button. We want to be able to toggle between: Default, Pressed (already made), Hover, Disabled, and Loading. That leaves us with 4 duplicates so go ahead and make those.</p><p><strong>Default<br></strong>For the default state, we basically just remove the fill from the shape.</p><p><strong>Hover<br></strong>Remember the rule of <em>Light Comes from the Sky? </em>Elements elevated from the interface will catch more light and thus appear lighter. Therefore, we’ll set the fill to white and give a something like 20% opacity. If you’re following a different framework or another set of UI guidelines, follow those instead.</p><p><strong>Loading (Optional)<br></strong>If you want, you can add a loading state to your button also. Place a loading icon in the Symbol and center it. Set its resizing property to “Float in place” so it won’t stretch like a rubber band if you chose to resize you Nested Button Symbol later on.</p><p><strong>Disabled<br></strong>Using disabled, we want to communicate “Zero Interaction Possible”. One way to achieve this is by giving the Symbol a white layer with an opacity of 50–60%.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*90DgezwFhpk2jXIN6ivDjA.png" /><figcaption>Different instances of the same Nested Button Symbol</figcaption></figure><p><em>“What about the Focused state?”, you might ask. Good question! There’re two ways to go about this. One, and the easiest, way is to simply make another duplicate of the ⚡️ State symbol, remove the fill and give it a colored inside border. Or, if you following the </em><a href="https://material.io/guidelines/components/buttons.html#buttons-raised-buttons"><em>Material Design Guidelines</em></a><em>, you simply make the fill black with 12% opacity. This is totally feasible. But in many other cases, the focused state is presented as a contrast-colored border around the element. Because we’re using the 📦 Container as a mask (or “cookie cutter”), nothing escapes its boundaries. In this case, we actually have to edit an instance of the ☀️ Shadow Symbol and give it an outside border. Kind of a tedious workaround so do whatever fits your project.</em></p><h4>🖋 Text Variations</h4><p>You might wanna add different color variations of the text, but for this tutorial, we’ll stick with white text only. Because the text layer is placed at the top of the Nested Symbol hierarchy, it won’t be affected but changes in states. And that’s good. But if we toggle the Disabled-state, we want the text to be affected as well. Therefore, we’ll make a duplicate of the text layer and set its opacity to 80%.</p><h4>🔦 Inner Shadow Variations</h4><p>For the time being, we want two variations for the inner shadow: One variation with and one without. You should be accustomed to the process by now: Duplicate the instance of the symbol and remove the inner shadow from the inspector. Remember to name the Symbols accordingly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uoK-3o79vYLCzHosa0lJ_g.png" /></figure><h4>🔦 Shadow Variations</h4><p>Final Symbol variation to add. You know you drill, right? Duplicate the Shadow-layer, edit and name it accordingly. Let’s add a larger shadow for the hovered button.</p><p>Now, if we return to the Artboard and try to toggle to your new shadow, we might encounter something like this</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/680/1*T7MiHKWyoeurdozvr9AIyQ.png" /><figcaption>Not cool.</figcaption></figure><p>See, Sketch has this quirk regarding shadows. Toggling Shadow Symbols casting a larger shadow than what is already set in the Nested Symbol, Sketch will cut the larger shadow off short. To fix this quirk, we apply the largest shadow to the Nested Symbol on the Symbols-page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JSfEztGZlf2wSxcoR4wQ0A.gif" /></figure><p>I wish I could give you a solid explanation for why Sketch behaves this way, but I simply don’t know. So if anybody knows, I’m happy to hear why.</p><p>Finally, we’ll add the focused state. Simply remove the fill and add a 2px outside border.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CvtifHqN8GluFPxLNBw48Q.png" /></figure><h3>*Part IV: Adding New Shapes of the Button</h3><p>What if you to add other shapes of buttons? Say, if you want a rounded button? To do this, we’ll duplicate the Button Symbol and adjust the container to give us the shape we’re going for. In this regard, it’s important to adjust the shadows accordingly<strong> </strong>by giving them the <strong>exact same border radius as your container. </strong>Otherwise, the shadow casts but the button will look incoherent.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/680/1*yBki9umaRDLCbA_yd7r4_w.png" /><figcaption>Rounded button casting a rectangular shadow just doesn’t feel right.</figcaption></figure><p>So, if we want to add more button-shapes, we’ll use the Duplicate-Edit-Name-pattern. For the added variations, I use the “/” to determine which Nested Button Symbol the shadow belongs to, and then I give it a name for the instance, like so:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YwPVzOycDHYyiPShp8yVAw.png" /></figure><h3>Wrapping Up</h3><p>Alright, we made it all the way through! We’re now able to make ourselves some Nested Button Symbols with ability to toggle colors, states and shadows. Well done!</p><p>As it’s probably clear, working with Nested Symbols in Sketch both has its advantages and its set-backs. On the plus-side, we only have to consult one central place to make changes systemic changes which means time saved in the end.</p><p>The centralized management of symbols can be a doubleedged sword, though. Especially if we want to make changes to your component. This means switching back and forth between the Symbols-page and our artboards to see how the instance of the symbol will look in the context of the UI. Also, working with shadow symbol is still kinda clunky. I hope our friends at <a href="https://twitter.com/bohemiancoding?lang=en">Bohemian Coding</a> will make up for this at some point.</p><p>On a final note, working with Nested Symbols does some amount of — You to have a pretty clear picture about which direction you’re going. As such, I’d recommend making this using the Nested Symbols in the later stages of your design process.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgumroad.com%2Fl%2FtLCu%3Fas_embed%3Dtrue&amp;url=https%3A%2F%2Fgumroad.com%2Fl%2FtLCu&amp;image=https%3A%2F%2Fstatic-2.gumroad.com%2Fres%2Fgumroad%2F7517497498327%2Fasset_previews%2F63ed0b10d2a258803653fb05beb0e5d8%2Fretina%2FNested_20Button.png&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=text%2Fhtml&amp;schema=gumroad" width="670" height="670" frameborder="0" scrolling="no"><a href="https://medium.com/media/273f2e7c46c5434decfb11bc6c809d67/href">https://medium.com/media/273f2e7c46c5434decfb11bc6c809d67/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/380/1*PWGfAE9worzUaGQw4-mc8g.png" /><figcaption>Hi there!</figcaption></figure><p><strong>Need a freelance UX/UI designer?</strong><em> </em><a href="/service/mailto:niels.koelmeyer@gmail.com">Let’s talk!</a></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fupscri.be%2Ff51076%3Fas_embed%3Dtrue&amp;dntp=1&amp;url=https%3A%2F%2Fupscri.be%2Ff51076&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=upscri" width="800" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/ed6399974de6e1c6fa5f3851dd966fad/href">https://medium.com/media/ed6399974de6e1c6fa5f3851dd966fad/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c0c91be46952" width="1" height="1" alt=""><hr><p><a href="https://blog.prototypr.io/nested-button-symbols-the-complete-guide-c0c91be46952">Nested Button Symbols: The Complete Guide</a> was originally published in <a href="https://blog.prototypr.io/">Prototypr</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>