Scaling icons with variables in Figma tutorial

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi design thinkers my name is Matthew here and today we are going to be getting into figma and we're going to be using some scaling variables to actually automatically scale up and down our icons so if you'd like to learn more about how to set up some scaling variables on your icons and have them automatically go up and down sizes you're in the right place so let's get into it all right here we are inside of figma basically if you do not have a scaling table or have some scaling numbers that is okay we are going to create our own very small one just for our icon set here though I would highly recommend you create your own uh scaling table of scaling numbers all they are is basically you have your base point scale number and then you're just multiplying those numbers by 1X 1.5x 2X and 3X uh but let's jump into how we can create our own scaling icons and demonstrate what we have over here so I've got a couple of these like simple little face icons down the bottom and what I've done is I've set them up and I've added in my scaling variable and I can go to my layers and I can actually start to use my scaling set because of my setup I've got a screen scale as well as a the multiplier that goes underneath and as you can see I can scale it up and down these four sizes I can start on my small point where I will start on a base of 12 and then I can scale it up to 18 24 and 36 for my small size and then if I'm on my medium screen I can go from 16 to 24 to 32 to 48 so on so now I have model scaling sizes that go up and down for my screen what we're going to do is just create a very simple version of this I'll leave those on but I'm just going to put down a couple of caveats if we're going to actually scale our icon we will need to make sure that our icon is not an outline icon for example I have an outline one and I've got a solid one we if we were to scale up and down these frames as you can see the outline itself will not adjust to the frame but the solid one will that's because this outline will not adjust as the scaling of the frame increases or decreases which is something good if you want to maintain that until the point where figur implements a outline scale this will not be possible with these types of icons so you're going to have to use solid icons for the time being if you want to have your own ability to scale using variables so how do we actually make an icon inside this Frame scale let's draw ourselves an icon frame we are going to set this Frame up just to 24 I'm going to clear out that background this will be my new icon frame what I can do is so I can grab my icon I can just Chuck that into that frame let me scale up that icon I'm going to keep about 2 pixels of P spacing around it and I need to set my icon frame to an auto lout and I'll need to make sure that of course I have my icon as a word so like I set my icon is icon I've set my icon to a base white but I'm not apply add any tokens or anything to it you're much better off setting up your Baseline set without those attached so let's set that to an auto lout let's set that to Center we are going to remove that number but before we remove that padding we actually need to set our icon in the frame to an absolute and what this does it means that the the actual icon can actually scale to the frame so I can click that to Absolute and now I can go down to scaling and I can now take away the padding of the auto layout on the frame and that icon will sit in the middle it will have about two spacing on either side cuz I set it up to be that way and now if I scale up or down this Frame you'll notice that it scale the icon scales with it which is exactly what I want and basically from there because I've set this to an auto layout as well I can now actually apply the actual variables to the height and width and I only need one height height and width variable applied because I'm going to keep it on a 1:1 ratio so let's set up our local variables now I've already set up obviously my own set if you haven't set up your own set you you can either set up your own scaling set that can be like this one if you like this is going by a scaling of two or if you want to just start from scratch or you just want to start from your own base point the scaling of this works like this so we're going to create a new collection we're going to make a very simple version of our icon sizes so we're going to go I icon and we come call this icon [Music] size and then I'm going to create some numbers so I will create this one uh so this one is going I'm going to have let's say four sets of numbers that I want to use for this particular size set so this will be my size and I will be starting let's say for example this set at a 16 so I will call this my H let's start with small and then we'll go to a medium then we are going to go to a a extra large and then we are going to go alsoo just large and then a extra large and that can be 16 that can be 24 that one can be 32 and this one can be 48 so now we have actually a scaling range from 16 20 4 3248 so if you want more obviously for your actual actual variable you obviously unless you're upgrading your plan to the the Enterprise version you're only able to add more modes that way the only other way to do it would be to have an actual scaling table like this and then looping in to your icon size set but for this that's a reasonable range and now all I need to do is I'll click onto my icon and I'm going to go up to the width and I am going to choose that new scaling that I created what I actually I do know that I have already size is this so I'm just going to call this something slightly different just so I can 100% get it right this be on size we just copy that all right go here apply we'll find icon size and then we go up to height and apply go icon size and then there we go now I can actually click on my icon I can go to my layer and I can now switch it between small medium large and extra large and now I have my own actual fre size range for my icon set here overall I hope this uh video has helped and gives you some fun ideas on how you can create your own icon sets and being able to then create your own layering if you are interested in some more advanced ways that you can set up your icon sets so that you can group them throughout a basically small medium large extra large screen set and then also having them tiered with uh four four levels of scaling then let me know in the comment section below but until next time design thinkers keep thinking keep building and keep creating amazing things and I'll see you guys all in the next video
Info
Channel: Pixellink
Views: 1,010
Rating: undefined out of 5
Keywords:
Id: PHFEsY471d4
Channel Id: undefined
Length: 10min 41sec (641 seconds)
Published: Sun Nov 19 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.