<?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 Egor Gorev on Medium]]></title>
        <description><![CDATA[Stories by Egor Gorev on Medium]]></description>
        <link>https://medium.com/@egorev?source=rss-ebff69b578f0------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*o-5JltwxxmBnifSDzKtfog.png</url>
            <title>Stories by Egor Gorev on Medium</title>
            <link>https://medium.com/@egorev?source=rss-ebff69b578f0------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 21:23:59 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@egorev/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[Sketch Smart Layout: Building a System Alert Component]]></title>
            <link>https://medium.com/sketch-app-sources/sketch-smart-layout-building-a-system-alert-component-d0332faa154f?source=rss-ebff69b578f0------2</link>
            <guid isPermaLink="false">https://medium.com/p/d0332faa154f</guid>
            <category><![CDATA[design-systems]]></category>
            <category><![CDATA[ui-component]]></category>
            <category><![CDATA[smart-layout]]></category>
            <category><![CDATA[sketch]]></category>
            <category><![CDATA[product-design]]></category>
            <dc:creator><![CDATA[Egor Gorev]]></dc:creator>
            <pubDate>Sun, 20 Oct 2019 08:56:44 GMT</pubDate>
            <atom:updated>2019-10-20T16:22:48.508Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eN0C98WW9rWDnSumMyCnbg.png" /></figure><p>It’s been a month already since Sketch released the <strong>Smart Layout feature</strong>, yet there are not so many tutorials out there covering more specific cases, rather than applying Smart Layout to the components like Buttons and Cards.</p><p>Recently I had the chance to explore this feature in real-life projects since I’m building two Design Systems at the same time right now. Truth is that it’s not that simple (at least for me) to quickly understand how to build a component and which Resizing/Smart Layout settings to apply in order to end up with a Symbol that works in a way I’d expect. That’s why today I would like to share my experience of <strong>building the</strong> <strong>System Alert Component</strong> using the Smart Layout feature. This is what we should have in the end:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*MoIHls9VeQDkqNsWRp7q-w.gif" /><figcaption>It’s just amazing how Smart Layout handles size and content changes</figcaption></figure><p>Ok, enough talking. Let’s build the component already!</p><h4>Step 1.</h4><p>To build this specific component you saw above you will need the following elements: 3 shapes, 2 lines (I still use a 1px rectangles for these), an icon and 4 text layers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bRhNRxEgVFTRXUkKnTCllw.png" /><figcaption><a href="https://www.dropbox.com/s/9lwfm89e9iuywj3/System_Alert_Elements.sketch?dl=0"><strong>Download the .sketch file</strong></a></figcaption></figure><h4>Step 2.</h4><p>Now it is time to bring all the elements together. You should end up with something that looks like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_twiJkM8HQNe1gMcKzdbIw.png" /></figure><h4>Step 3.</h4><p>Next, we’ll need to group some elements, otherwise the component will fall apart when being resized. Create the following groups:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*COzmUY-WVpM5ixzv9GJ9gg.png" /></figure><h4>Step 4.</h4><p>At this point, we want to apply the resizing settings for each group or element. The screenshots below show you which settings I’ve used for every group and element in my component. Let’s start with the Icon group. We want it to stay fixed on the left and <strong>not stretch when resizing</strong>. We also want it to move up and down since we can have multiple lines of text in the component that we’re building.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uKs4QTpDTdXeDapmn5VxSQ.png" /><figcaption>Resizing settings for the Icon group</figcaption></figure><h4>Step 5.</h4><p>Here it’s important to pin this group to the <strong>Left</strong>, <strong>Top</strong> and <strong>Right</strong> <strong>edges</strong>. Since we will have the Actions group on the right, it will prevent a gap forming between the groups when resizing the component (see below)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hKNsLn5XSoIW6-Ub05oFug.png" /><figcaption>Resizing settings for Icon+Shape group</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qgtZraqw5vACGfVzykJ1RA.png" /><figcaption>The gap that forms when resizing if we don’t apply the Pin to Right Edge setting</figcaption></figure><h4>Step 6.</h4><p>Now it’s time to set the resizing settings for the Actions group. Make sure to apply the resizing settings to all the elements first. I also encourage you to take some time and try to understand why the following resizing settings were applied to each element and in the end to the group.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qM9vrHXsyD7j7KWmn-B96g.png" /></figure><h4>Step 7.</h4><p>Last but not least. Set a custom width for these text layers (in my case it’s 168 px), select Auto Height in the Alignment section and all 4 options in Pin to Edges area.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Zi8RklGN8ECWScpzK8l--A.png" /><figcaption><strong>Custom width</strong> + <strong>4 Edges</strong> to pin to + <strong>Auto Height</strong> alignment</figcaption></figure><p><strong>Step 8.</strong></p><p>Aaand we’re finally ready to <strong>create the Symbol!</strong> Select two groups together with two text layers (Title, Description), hit <strong>‘Create Symbol’</strong> and select <strong>Top to Bottom Layout. </strong>That’s it! Now the component should work as intended.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GvLs0O3t2-wAKOOh4A6KEQ.png" /><figcaption>When creating the Symbol it’s important to select the <strong>‘Top to Bottom Layout’</strong>. It will do all the magic ;)</figcaption></figure><p>You can now try to override the text inside it, resize it as you wish and it should automatically fit the content and follow resizing rules that we’ve set before. If after the resizing the component looks ‘broken’ make sure to hit the <strong>‘Shrink Instance to fit content’ </strong>button (you will find it in the <strong>Overrides panel</strong>). In case you need my original .sketch file you can <a href="https://www.dropbox.com/s/2i8mvys0k3j229l/System_Alert_Final.sketch?dl=0"><strong>download it here</strong></a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NiaM3UCBKEinA2kPuHoV2g.png" /><figcaption><strong>‘Shrink Instance to fit content’</strong> button in the <strong>Overrides panel</strong></figcaption></figure><p>So, yeah. Such a small component requires quite a lot of actions to be taken. But it is amazing what Sketch is capable of doing already with this feature. And I can only imagine how many hours it will save us in the future while we continue designing digital products.</p><p>At the moment I am working on a <strong>Design System</strong> of my own, where I’m trying to apply Smart Layout to as many components as possible. Don’t hesitate to <a href="https://gumroad.com/egorev"><strong>subscribe</strong></a> and I will let you know when it is ready to use.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9WKJeDyjWfn1n8OfmONHtg.png" /><figcaption>Sneak peek of my Design System</figcaption></figure><p>Additionally, you can <a href="https://twitter.com/egorevv"><strong>follow me on Twitter</strong></a> for updates and new tutorials.</p><p>Thank you for reading! I hope that today’s tutorial helped you understand the Smart Layout feature a little bit better.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d0332faa154f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/sketch-app-sources/sketch-smart-layout-building-a-system-alert-component-d0332faa154f">Sketch Smart Layout: Building a System Alert Component</a> was originally published in <a href="https://medium.com/sketch-app-sources">Design + Sketch</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>