<?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 Mai P. Vu on Medium]]></title>
        <description><![CDATA[Stories by Mai P. Vu on Medium]]></description>
        <link>https://medium.com/@iammai-design?source=rss-a004b547524a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*6VNwzqgxqpbTBVazOb-pTQ.jpeg</url>
            <title>Stories by Mai P. Vu on Medium</title>
            <link>https://medium.com/@iammai-design?source=rss-a004b547524a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 08:34:01 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@iammai-design/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[Benefits of Figma’s interactive variables: an example through a to-do list]]></title>
            <link>https://medium.com/design-bootcamp/benefits-of-figmas-interactive-variables-an-example-through-a-to-do-list-ab9ec78eb9fb?source=rss-a004b547524a------2</link>
            <guid isPermaLink="false">https://medium.com/p/ab9ec78eb9fb</guid>
            <category><![CDATA[figma]]></category>
            <category><![CDATA[variables]]></category>
            <category><![CDATA[prototyping]]></category>
            <category><![CDATA[figma-tutorial]]></category>
            <dc:creator><![CDATA[Mai P. Vu]]></dc:creator>
            <pubDate>Thu, 28 Mar 2024 09:21:36 GMT</pubDate>
            <atom:updated>2024-04-04T14:40:06.582Z</atom:updated>
            <content:encoded><![CDATA[<h3>When, why, and how to use interactive variables in Figma</h3><h4>Variables can make Figma prototyping a lot easier and manageable. In this article, I’ll attempt to show how through a to-do list example</h4><p>Back in June 2023, Figma introduced several <a href="https://help.figma.com/hc/en-us/articles/15336833927191-What-s-new-at-Config-2023">new features during Config</a>, including variables that can be used for both <a href="https://help.figma.com/hc/en-us/articles/14506587589399-Use-variables-in-prototypes">design system and prototyping</a> purposes.</p><p>There are multiple resources on how to <a href="https://medium.com/@the_joey247/how-to-use-variables-in-figma-deee0a664ace">create and set up variables</a>, <a href="https://uxdesign.cc/design-system-figma-variables-f3d9c4351bcc">how to optimize design systems with variables</a>, and also on the <a href="https://veeuix.medium.com/advanced-prototyping-with-figma-variables-complete-guide-1fbf91d25abf">basic operations with variables for prototyping</a> — Figma has a pretty nice <a href="https://www.figma.com/community/file/1234939241273272375">playground file</a> on it themselves.</p><p>However, even after almost a year, using variables for prototyping can still be confusing for designers and something that requires a big learning curve. Knowing how to use them though can be super powerful.</p><blockquote><strong>Variables for prototyping can significantly reduce the number of frames and interactions you would normally need</strong> when not using variables.</blockquote><figure><img alt="Without variables: 8 frames &amp; 24 interactions; with variables: 1 frame &amp; 8 interactions" src="https://cdn-images-1.medium.com/max/1024/1*fR54yMnFO1m5S7-oFcMOhw.png" /></figure><p>It is definitely challenging to know<strong> how to use it and when to use it</strong>. So in this article, I will try to help finding some answers to these questions, through the example of a to-do list prototype.</p><p>The to-do list’s functionalities are:</p><ul><li>checking and unchecking items</li><li>a counter that shows the number of tasks the user has done</li></ul><figure><img alt="A gif of a to-do list prototype" src="https://cdn-images-1.medium.com/max/912/1*r3FxN9fgyfpVteY2h_2NQQ.gif" /><figcaption>A to-do list prototype</figcaption></figure><p><strong>You can also find a link to my published file in Figma community in the end of this article!</strong></p><p>Now lets dive into this 👇</p><h3>Comparing the two approaches</h3><h4>Without variables</h4><p>For a fully functional to-do list with 3 items, we would need to make the frame 8 times for each of the different states. After that we would need to setup 8x3 = <strong>24 interactions between the 8 frames</strong>.</p><figure><img alt="A view of the no variables option, showing a lot of chaotic connections between 8 frames" src="https://cdn-images-1.medium.com/max/1024/1*qp8DfpgWljI6LcsFWAY_AQ.png" /></figure><p>These numbers increase drastically with the number of tasks.</p><p>For <em>x</em> tasks there would be <em>2^x</em> <em>frames</em><strong><em> </em></strong>and <em>x(2^x) </em>interactions. So for 4 tasks, there would be 16 frames and 64 interactions!</p><p>This can get quite annoying to manage:</p><ul><li>making sure that all the interactions are going from the correct spot to the expected frame</li><li>updating styles on all the screens if needed</li><li>updating the interaction types if needed</li></ul><blockquote>Without variables for 3 tasks, there needs to be 8 frames &amp; 24 interactions. For 4 tasks it is 16 frames and 64 interactions — and it just grows exponentially with additional tasks.</blockquote><h4>With variables</h4><p>However, with variables for interactions, life is much easier: o<strong>nly 2 interactions and 1 frame</strong>. In fact, this number would not change if we had more tasks.</p><figure><img alt="Design using variables, showing only 2 interactions in a component set, and a frame." src="https://cdn-images-1.medium.com/max/1024/1*rp71KFdTT4Qs_Cnv_66DaA.png" /></figure><blockquote>With variables it is always 1 frame and 2 interactions — no matter how many tasks there are, let it be 2, 4, or a 100.</blockquote><p>Pretty amazing!</p><h3>Setting up the checkbox and the counter</h3><figure><img alt="Image showing the checkbox component set and the counter in the design" src="https://cdn-images-1.medium.com/max/1024/1*olnzSy9KOGaqUONwsuVc-g.png" /></figure><p>As the first step, let’s make:</p><ul><li>the checking and unchecking of a checkbox</li><li>for the counter to go up and down based on the number of checked checkboxes</li></ul><h4><strong>2 local variables</strong></h4><figure><img alt="2 local variables in Figma (TASKS_TOTAL set to 3, and tasks_done set to o)" src="https://cdn-images-1.medium.com/max/558/1*RYPhzhxd2hBXCF9F9tj4EQ.png" /></figure><p><strong><em>TASKS_TOTAL</em> <br></strong>is the number of tasks that are in the list — in this case it is 3. It is a constant variable, meaning that it will not change throughout our prototype.</p><p><strong><em>tasksDone</em></strong><em> <br></em>is the number of tasks that are done. This number will continue changing as the user interacts with the prototype (unchecking &amp; checking tasks).</p><h4>Connecting the variables to part of the prototype</h4><p>First, connect the <strong>TOTAL_TASKS</strong> variable to the the total task counter in the design:</p><figure><img alt="Gif showing how to connect TASKS_TOTAL to the design" src="https://cdn-images-1.medium.com/max/958/1*_0qcKn5CAg74AbYdIviyyw.gif" /></figure><ol><li>Select the text field (in my case it is this number 3)</li><li>Click the variable icon on the right side in the <em>Text </em>section</li><li>Select the <strong>TOTAL_TASKS </strong>variable</li></ol><p>Then, connect the <strong>tasksDone</strong> variable in a similar way:</p><figure><img alt="Image showing how the tasksDone variable is connected to the design" src="https://cdn-images-1.medium.com/max/580/1*C3n7a9TsX-OQaNlgid8zyg.png" /></figure><p>In my case, I connected it to this number 0 text field.</p><blockquote>Note: the 0, /, and 3 are three different text fields in an auto layouted frame. This lets you connect the correct variables to the correct part. The auto layout will also keep the space between each of them correct as the numbers change.</blockquote><h4>Setting the checkbox interaction using the 2 variables</h4><p>Let’s say we have the following setup for a compont set for checkbox tasks:</p><figure><img alt="The setup of the checkbox task component set" src="https://cdn-images-1.medium.com/max/483/1*AOr0UX_fXkg5WSykl1Uk2A.png" /></figure><ul><li>one variant that is for an unchecked task</li><li>another that is for a checked task</li><li>the property they have is <em>is-done </em>that is <em>false </em>if the task is unchecked, and <em>true </em>if it is checked</li></ul><p>Now, for the interaction on the <em>unchecked </em>variant:</p><figure><img alt="The interaction for the unchecked variant" src="https://cdn-images-1.medium.com/max/602/1*VF7K5QE5KeQaOzpi4j2ubA.png" /></figure><ol><li>When clicking on an <em>unchecked</em> variant, we want <em>tasksDone</em> to increase by 1 (since clicking it means that the user has finished one more task)</li><li>Then, we want to change it to the <em>checked</em> variant (where <em>is-done</em> is <em>true</em>)</li></ol><p>For the <strong><em>checked</em> </strong>variant, we want something similar, except that we want</p><ul><li><strong><em>tasksDone</em></strong> to <strong>decrease</strong> by 1 (since clicking it means the user has one more unfinished task).</li><li>the <strong><em>checked </em></strong>variant to change into the <strong><em>unchecked </em></strong>variant (where the <em>is-done</em> property is false).</li></ul><h3>Adding in the task-bar (the progress bar)</h3><figure><img alt="Showing what the task-bar / progress bar is in the design" src="https://cdn-images-1.medium.com/max/1024/1*v0QIxk44eYQtogdtM86EFg.png" /></figure><h4>2 more local variables</h4><figure><img alt="The 2 new local variables in Figma: BAR_MAX_WIDTH set to 249, and barWidth set to 0" src="https://cdn-images-1.medium.com/max/778/1*pAmJETQnn6WmeX8yfL-pCw.png" /></figure><p><strong><em>BAR_MAX_WIDTH:</em></strong><em> <br></em>this is the max width of what the bar’s width could become (the gray’s width). It is a constant variable that will not change throughout the interactions. In my prototype, it is 249px width, so I set this variable to 249.</p><figure><img alt="Image showing the gray bar’s width being 249" src="https://cdn-images-1.medium.com/max/1024/1*8brv7euozdWuhGlMmo27CA.png" /></figure><blockquote>Note: this also shows a downside of this method, where this couldn’t account for responsiveness (for the bar itself), as it is a fixed width</blockquote><p><strong><em>barWidth</em></strong><em>: <br></em>this is the width of the pink bar, representing the % of the done tasks. This will be changing throughout the prototype. At start, there are 0 tasks done, so I set it to 0.</p><p>We will connect the pink bar’s width to the variable:</p><figure><img alt="Image showing the pink bar, and how to set it to barWidth" src="https://cdn-images-1.medium.com/max/578/1*Mn_BjA0UeK-6UE4zuOclcQ.png" /></figure><ol><li>select the “pink” bar</li><li>hover over the width</li><li>click on the variable sign</li><li>select <em>barWidth</em></li></ol><p>The bar should disappear and look like this:</p><figure><img alt="Image showing how the pink bar supposed to be hidden as its width is 0" src="https://cdn-images-1.medium.com/max/492/1*QLe8z2RSfQCYA-lPUdDIhA.png" /></figure><h4>Updating the task component interactions</h4><figure><img alt="The new action in the updated checkbox variants" src="https://cdn-images-1.medium.com/max/488/1*0OTbHxb4fNEy9YPKYg4W7Q.png" /></figure><p>For both of the <em>unchecked </em>and <em>checked</em> variants we want to add in this same part to <strong>update the <em>barWidth </em>variable</strong>:</p><p>this requires a bit of math, but basically the width of the bar should show the percentage of done tasks based on the max width of the bar.</p><p>So if <strong>BAR_MAX_WIDTH (249px) is when 3 tasks are done,</strong> then the question is how many pixels will represent the currently done tasks done:</p><p>249px ➡️3 tasks<br>x px ➡️ tasksDone</p><p>With a little cross multiplication, we get that <em>x = tasksDone * 249px / 3</em></p><p>So that’s basically what this action means on the image.</p><p><strong>And this is basically it! You are done! 🥳</strong></p><h3>Additional notes on using variables</h3><h4>Pros</h4><ul><li>Significantly <strong>less interactions</strong> to set up (here only 2 instead of 24)</li><li>Significantly <strong>less frames </strong>to have (here just 1 instead of 8)</li><li>Easy to update later on if needed</li></ul><h4>Cons</h4><ul><li>The task bar is not responsive as it has a fixed width (and that is important to calculate the width of the done-tasks bar)</li><li>You cannot do smart animations when changing something by updating a variable. So in this case, when using variables, the progress bar can’t grow and have smart animation</li></ul><h4>When will this not work?</h4><p>If you want something else happen depending on a particular task’s state, this might be a little more complicated</p><p><strong>Example:</strong> if there are 3 tasks and 3 images, and you want an image to be shown or not shown depending on which task is checked.</p><p><strong>Why wouldn’t this work?</strong> Since these interactions happen within the component set, it needs to be actions that are applicable to all of its instances. In this case, you would want each instance to have one extra action that is always a bit different (related to a different image).</p><p><strong>How to make it work in this case?</strong> You would want the interactions to not be on the main component, but instead on each of the instances. This means that you would need to have an interaction on each of the checkbox instances. This would still be just 1 frame, however, instead of just 2 interactions there would be as many interactions as checkboxes in your prototype.</p><h3>Takeaways— when should you use variable interactions?</h3><p>From this example, it is clear that interactive variables can be powerful, it also has some downsides. In the current state of how Figma handles them, it can be a bit less helpful in some instances.</p><p>So you might ask: <strong>“when should I use variables for interactions in a component set?”</strong></p><p>These are my tips:</p><ul><li>if you want to control something outside of the component — in this case controlling a the <strong><em>task bar </em></strong>outside of the component set, and</li><li>if you also want it to control the outside thing always the same way — in this case you always want to update the <strong><em>task bar</em></strong><em> </em>based on the same formula, no matter which instance of the checkbox is getting checked or unchecked.</li></ul><h3>Get a working copy of my prototype</h3><p>I have published my prototype to the Figma community and you can access it also over here:</p><p><a href="https://www.figma.com/community/file/1261221430583572452/to-do-list-with-conditional-logic-variables">To-do list with conditional logic &amp; variables | Figma</a></p><p>Hope you find this all helpful, and made it a bit easier to understand variables.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ab9ec78eb9fb" width="1" height="1" alt=""><hr><p><a href="https://medium.com/design-bootcamp/benefits-of-figmas-interactive-variables-an-example-through-a-to-do-list-ab9ec78eb9fb">Benefits of Figma’s interactive variables: an example through a to-do list</a> was originally published in <a href="https://medium.com/design-bootcamp">Bootcamp</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to make a better button: is a centered button really centered?]]></title>
            <link>https://medium.com/design-bootcamp/how-to-make-a-better-button-is-a-centered-button-really-centered-1fa5ab8bb70a?source=rss-a004b547524a------2</link>
            <guid isPermaLink="false">https://medium.com/p/1fa5ab8bb70a</guid>
            <category><![CDATA[product-design]]></category>
            <category><![CDATA[button]]></category>
            <category><![CDATA[figma]]></category>
            <category><![CDATA[button-design]]></category>
            <category><![CDATA[ui-ux-design]]></category>
            <dc:creator><![CDATA[Mai P. Vu]]></dc:creator>
            <pubDate>Thu, 14 Mar 2024 15:20:31 GMT</pubDate>
            <atom:updated>2024-03-22T15:08:18.479Z</atom:updated>
            <content:encoded><![CDATA[<h4>There is a little more trick to buttons than just adjusting for size and border radius — let’s see what it is and how to implement it</h4><p>Every app and website has buttons. It is just a text in a frame, sometimes with an icon. Add some border radius on it and a fill color, some padding, hopefully made with auto layout, making sure that all is centered… and it is just that easy, right?</p><p>… Well, not really 👀</p><p>In the beginning of my design journey, after I realized that spacing and size matters (I know, shocking), one of the first things I Googled was <em>“button size design.” </em>I am sure most designers have had this in their Google search history at some point. There are so many great articles out there regarding to buttons:</p><ul><li><a href="http://ui/UX%20tips:%20A%20guide%20to%20creating%20buttons"><strong>UI/UX tips: A guide to creating buttons</strong></a> : What makes up a button, types of buttons, and tips on sizing, colors, and microcopy.</li><li><a href="https://michaelgearon.medium.com/level-up-designing-better-buttons-6c0e2571b1d1"><strong>Level up — How to design better buttons</strong></a><strong> </strong>: Besides shapes, size, microcopies, and button types, this article also gives suggestions on how to use them in your designs</li><li><a href="https://uxdesign.cc/ui-cheat-sheets-buttons-7329ed9d6112"><strong>UI cheat sheet: buttons</strong></a><strong> : </strong>If you read one more article on buttons, let this be it. It is a longer read, but it covers a lot of the things as the previous two, but this one gives a more details to them.</li></ul><p>And there are of course many other ones. <strong>However, there is one thing none of these talk about</strong>, and it took me months to figure out and notice in the first place: <strong>how to make a centered button</strong>.</p><p>Okay… you are probably thinking: <em>“this cannot be that hard, just make sure that the content is perfectly centered in the button.”</em></p><p>That’s what I thought also and I never questioned the “centeredness” of my buttons, but <strong>later on I learned that maybe none of my centered buttons were really correct</strong>🫢</p><p>In this article I will dive into</p><ul><li>what the secret is behind a “centered” button,</li><li>how to implement it, and</li><li>why that implementation works</li></ul><p><strong>So let’s get started! 👇</strong></p><h3>The secret of a centered button</h3><p>Let’s do a little test.</p><p>Which button feels <strong>more correct</strong>?</p><figure><img alt="2 button options that look slightly different" src="https://cdn-images-1.medium.com/max/1024/1*G9lUv5PZfr6iewJRaX-W-A.png" /><figcaption>2 button options that look slightly different</figcaption></figure><p>3…</p><p>2…</p><p>1…</p><p>I hope your answer was <strong>the bottom one.</strong> At least that’s what most people think:</p><figure><img alt="A twitter poll where people all said that the bottom one feels more correct" src="https://cdn-images-1.medium.com/max/743/1*B4TnVM02i3u6u2p_L-xXKg.png" /><figcaption><a href="https://x.com/hey_iammai/status/1764321660948095476?s=20">A twitter poll where people all said that the bottom one feels more correct</a></figcaption></figure><p>It feels much more visually centered (horizontally). However, did you know that <strong>technically the top one is centered?</strong></p><figure><img alt="The spacing for the 2 buttons" src="https://cdn-images-1.medium.com/max/1024/1*CZCTJWv1I6Fu0UGimIi0Iw.png" /><figcaption>The spacing for the 2 buttons</figcaption></figure><p>For the first button, there is 24px padding on both sides, while for the second button there is 24px on the label’s side and 16px on the icon’s side.</p><blockquote><em>Interestingly, even though the first one is actually centered, when you add an icon to one side of the button, it makes it feel like there is much more space on that side. </em><strong><em>So it is better to reduce the padding on the icon’s side.</em></strong></blockquote><h3>The problem with the implementation</h3><p>Well, this is not exactly a problem, but an inconvenience.</p><p>Let’s look at a button component, where we have:</p><ul><li>primary, error, and success variants in</li><li>default and hover states,</li><li>each with a right icon that can be on or off</li></ul><h4>Technically centered (not the correct one)</h4><p>If you just make it technically centered, but not visually centered, you are dealing with 6 variants in total, where you can have a no-icon version by removing that from the instance. By just putting 8px as gap, and 24px as for left and right paddings</p><figure><img alt="Primary, error, &amp; success buttons in default and hover states" src="https://cdn-images-1.medium.com/max/1024/1*vUp1FwzIJinn6Pm1LVI7Xw.png" /><figcaption>Primary, error, &amp; success buttons in default and hover states</figcaption></figure><h4>Visually centered (the correct one)</h4><p>However, if you do care to make it visually centered, suddenly you find yourself with <strong>twice as many variants </strong>— 12 variants in total:</p><figure><img alt="The same button component set when accounting for visual centered-ness with right and no icons" src="https://cdn-images-1.medium.com/max/1024/1*rHBhvfVe20tPpBGOSXov9A.png" /><figcaption>The same button component set when accounting for visual centered-ness with right and no icons</figcaption></figure><p>Here I adjusted the 24px right paddings to 16px on the icon’s side. This can be a bit more annoying to manage.</p><p>Then, if you also want to account for left icons, you find yourself with<strong> 3x more variants </strong>— 18 in total:</p><figure><img alt="Same button component set, now also accounting for left icons." src="https://cdn-images-1.medium.com/max/1024/1*iL7Cc56NcSVUCi5hA8D1CA.png" /><figcaption>Same button component set, now also accounting for left icons.</figcaption></figure><p>We have all these extra variants, because depending on where the icon is, the left and right paddings can be:</p><ul><li>16–24,</li><li>24–24, or</li><li>24–16.</li></ul><p>This can get more chaotic if you make buttons for active states, or different sizes, etc. Not really ideal to manage.</p><blockquote><em>Making it “more correct” might leave you with 3x more variants than you actually need.</em></blockquote><h3>The solution to avoid the extra variants</h3><p>The secret is to put the label itself into another auto layouted frame.</p><p>In my example I have an</p><ul><li><strong>outer-frame: </strong>this includes the left and right icon, and a</li><li><strong>label-frame: </strong>that just has the “Label” text field.</li></ul><figure><img alt="The layer setup of a button" src="https://cdn-images-1.medium.com/max/200/1*dsvDtse6SORmgiNENZn4Wg.png" /><figcaption>The layer setup of a button</figcaption></figure><h4>The label-frame</h4><figure><img alt="The setup of the label-frame" src="https://cdn-images-1.medium.com/max/1024/1*GCE8CfBaxWuCVcUSTe1aJA.png" /><figcaption>The setup of the label-frame</figcaption></figure><p>For the inner frame (the <em>label-frame</em>), you want to have a left and right padding that is essentially the gap you would want to have between the label and the icon — in this case I put 8px.</p><h4>The outer-frame</h4><figure><img alt="The setup of the outer-frame" src="https://cdn-images-1.medium.com/max/1024/1*lGeQ9tacsAOrONKakQZYRw.png" /><figcaption>The setup of the outer-frame</figcaption></figure><p>For the <em>outer-frame</em>, you don’t need to add any gap between the items inside as the <em>label-frame </em>takes care of it already.</p><p>For the left and right paddings of the outer frame, you want to put the number that is:</p><pre>{the number you actually want} - {the gap}</pre><p>So in this case, I actually wanted 24px on both sides. But the “gaps” are 8px, so I will put 24px — 8px = 16px as the padding.</p><h4>The outcome</h4><p>This method will leave you with<strong> 6 variants again</strong>, the same amount as if you didn’t care for centering the items inside visually.</p><figure><img alt="The final result if you wanted to support left, right, and no icon options that are visually centered" src="https://cdn-images-1.medium.com/max/1024/1*QK9VvfQrcSnJHYvXgbizPg.png" /><figcaption>The final result if you wanted to support left, right, and no icon options that are visually centered</figcaption></figure><p>This works even if you only want to support for example right-icon and no icon variants (and not left-icon variants). Just don’t include the left icon in your variants then!</p><figure><img alt="If you only wanted to support right and no icon options" src="https://cdn-images-1.medium.com/max/1024/1*xd4C_RHUyMmDgIdeIpWueA.png" /><figcaption>If you only wanted to support right and no icon options</figcaption></figure><h3>Why does this work?</h3><p>It might take an extra few minutes to wrap your head around this method, but I’ll try to explain it now.</p><p>Just to reiterate the start of this article, to make the button feel visually centered, we want to have a <strong>smaller amount of padding on the icon’s side.</strong></p><p>In my specific example, I wanted</p><ul><li>24px on the left and right of the button,</li><li>8px as the gap, and</li><li>a bit less px on the icon’s side if there is an icon — that turned out to be 16 based on our formula above.</li></ul><p>Now, here is a breakdown on how this looks depending on the number of icons:</p><figure><img alt="Demonstrating how the button’s spacing is with both, right, and no icon" src="https://cdn-images-1.medium.com/max/1024/1*hFSgZzBHa10sgF1vVeXhtg.png" /><figcaption>Demonstrating how the button’s spacing is with both, right, and no icon</figcaption></figure><ol><li>If both icons are there, there is 16px as the left and right padding of the button</li><li>If there is only a right icon, there is still 16px on that side of the button, however on the left side, now there is 16px + 8px = <strong>24px</strong> ! Just what I wanted</li><li>If there is no icon, there is 16px + 8px = <strong>24px </strong>on both sides of the icon. Again, what I wanted.</li></ol><h3><strong>Wrapping it up</strong></h3><p>If there is only 3 things that stick with you from this article let them be:</p><ol><li>Have smaller paddings on the icon side to make buttons visually centered</li><li>Put the label into a frame with left &amp; right paddings equal to the gap you want between the label and the icon</li><li>Have 0px gap on the button itself and reduce the left and right padding by the number you wanted as a gap</li></ol><p>Overall this is just a small trick to make your buttons just a little bit better while also managing them easily. Maybe you already knew about all of this, but if you haven’t, I hope you found this article helpful!✨</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1fa5ab8bb70a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/design-bootcamp/how-to-make-a-better-button-is-a-centered-button-really-centered-1fa5ab8bb70a">How to make a better button: is a centered button really centered?</a> was originally published in <a href="https://medium.com/design-bootcamp">Bootcamp</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>