UI Card Designed with Auto Layout - Figma Crash Course

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] hello my name is pablo stanley and this is part of a crash course on figma's auto layout in this lesson we'll create a simple ui card an image some metadata and actions easy right oh but we want it to expand shrink down keep the padding around it and all the elements in place well we'll use outer layer to solve this first we'll create the top level data without a spacing then we'll add an image that fills the container from left to right and then we'll add some actions below with dynamic spacing and that's it let's do this okay so let's take a look at what we're going to build this is a very typical ui card but it has some complexity hidden inside it so you can see that it's divided in three parts we have we're heading with our title subtitle then we have the image and then we have the actions in the bottom in the heading we have this section which its own padding has padding here all around it and also inside it we have an action that is pinned to the right and then we have this little icon on the left which could be also like an avatar and also a title subtitle so this is its own auto layout with its own outer layout it's multiple outer layouts put together then the image is just an image it's just a container that is filling the width there's no padding around it just like it's full bleed and then we have the actions with its own padding around it but also the actions the icon you can see that they are their own auto layout so a lot of outer layouts nested inside other auto layouts so let's build this okay so here i have all the elements that i'm going to be using all the different icons and also some text layers that i'm going to use for the title and subtitle if you want to use these assets there's a link in the description first thing title on the subtitle i want them to be next to each other one on top of the other so i'm just going to put them like that and then i'm going to create an auto layout out of them so i'm going to press shift a and now i create an auto layout and i have the different options here i actually want it to be four pixels between them and that's the spacing between them i can add more if i wanted to but i think 4 pixels should be good so now i have this out the layout i have what is going to be my avatar i'm just simulating with this gray square and i suppose i should put this icon on the right because that's going to be my heading it's just like an overflow menu so i'm going to select all of these and i'm going to press shift a now i press shift a and it just try to calculate the spacing between them that will be even right now it's 72 but actually maybe 16 pixels should be enough that should be the spacing between actually 8 pixels i don't want more than that now something that you'll notice is that everything is aligned to the top and i want to align it to the center so i can just change this and i want it to be aligned here to the center it's not going to make a huge difference if you make it here or here or here but i'm going to show you what if you grow it a little bit like this and you grow it then if you align it like this then you will see that it will align to the right but right now we actually want it to be a line to the left and now but do we do want this icon to be pinned to the right so how can we do that well we can say that this element instead of hogging the contents we want to fill the container and now that it's filling the container just like trying to push all the elements so it's fill in the container and this one and this one they both remain with the fixed width and a fixed height and that way these are not pushing this this are not stretching the only one that is a stretching is the one in the middle and it's pushing the elements to the sides so now uh this great box looks a little bit too boring so let's change it i'm going to use the blush plug-in with illustrations i'm going to just select this rectangle and i'm going to change it uh i'm going to change it to this one from young this street life collection and it has a hit character that i really like just going to select one of them and just replace that rectangle with random head illustration looks pretty cool i actually like that one but i'm going to press random button just see what it gives me i also like that one ah man it's just addictive to just keep pressing the random button okay last one and you know what i actually like this goofy face so i'm going to select that goofy face okay cool so now we have this this is going to be our heading i'm going to call it heading heading and these are going to be the actions below but before we put the actions below let's actually add an image so this image is going to be well it's just a rectangle and let me just make it a little bit bigger just around there around there is going to be the image and i'm going to use a different plugin for this i'm going to use the unsplash plugin and i really like the minimal collection so i'm just going to press minimal let's see what else they got oh man that actually pretty pretty nice one last one oh man these are really really minimal these are really clean i know okay that one looks good it's not as minimal yeah i i just like that one with the balloons and the chair okay cool so we have that now uh we have the image we'll go back to it in a second now let's build or bottom action so right now we have all these uh icons and i want to be able to just like add a number next to them so people can know how many likes have been added to this card so i'm just going to add six likes so six i'm going to change it to a lighter weight around there and i'm going to select this the icon and the number and i'm going to say shift a to add an auto layout this is an output layout i'm going to say that it's 8 pixels actually that's too much so four pixels and let's align it to the center align to the center that is looking good so okay so i like this now i want to duplicate this element i want to be able to the same but with the comments so i'm just going to copy this one i'm going to paste it over here and you see how it just added to the auto layout so when you add it to the outer layout it's just adjusting to it if i were to uh let's just for demo sake let me just show you like if i paste it again see how it's pushing the content it's just adjusting to it and if i wanted to i can add more spacing less space if i just delete the stuff that i don't want i don't want this this and this i only want to leave this one so i just delete it and it just out to magically uh adjust its position how cool is that i'm going to do the same with the last one with the camera i'm going to cut it and i'm going to paste it over here i'm going to move it i can actually just move it like that and it snaps into place i'm going to remove this one now i'm going to rename all of these this should all have been renamed something i'm going to press command r i'm going to name them actions or social actions i don't know what you want to call it action and then i'm going to put this one this one doesn't have a number so all of these are out the layouts in this action and i'm actually going to select all of these and i'm going to turn all these into and out to layout too so i'm going to press shift a and boom now it's adding an auto layout to all of these i'm going to align into the center i'm going to line to the center center like this it doesn't look like it did anything and that's okay don't worry about it but now we have this we have all of our elements we have this one we have our image and we have our bottom options so i'm going to rename it bottom heading and then image okay so we have all these i'm going to actually select all of these and i'm going to add another layout to them so i'm going to press shift a boom and now it added an outer layout to this whole thing and now to this whole thing i'm going to call it ui card and to this ui card i'm going to add a fill just a white fill that is just behind everything it's starting to look like a ui card but you can see that not everything is great what if i resize it not so cool right it's uh something is not right so let's fix some of these things first thing is that this thing i wanted to be all of these elements actually i want all of these elements to be filling the container let's resize it again just so you can see what happens let's say that it re resizes like this if i resize it like this and i want to say instead of having a fixed width or hot container i want it to be fill container you see what is happening now now it's trying to fill the container and it's trying to on the width just like adjust the size of it now the spacing between this and this and this right now it's at 14 pixels i'm actually going to change it to zero pixels i know that's not great but i'm going to show you why i'm doing that in a second so okay so right now they're all together but also this thing i wanted to be aligned to the bottom so how am i going to do that remember we are doing this over here that we're expanding this text well we're going to do the same but with the image now the image i'm going to say that instead of a fixed height i want to be filling the container you see this now it's actually pushing this actions all the way to the bottom so now if i resize this see now the image is resizing but it's also pushing the actions and skipping this thing on the top so it's looking pretty pretty nice but now we want this to have its own spacing so we want to add some padding to this one so that's why i didn't add padding between the elements i'm going to add the padding to the actual top so i'm going to actually say 8 pixels around it boom look at that that looks nice let's do the same here let's add 8 pixels around it that looks pretty good but also i don't know if i like how these elements are aligned right now they're just like center they're all together but they're center and i want this to be just like i don't know just expanding it's a spacing according to the size of the card so what i want to do is go over here on this bottom and i want the spacing between the elements i can do two things i can just type in auto auto look at that it just added automatic spacing between the elements so the spacing between this this this it's always adapting to the size to the width of the card you could have also just done this here instead of saying packed you could just say space between and then would have put this in automatic just in case that's another way to do the same thing so okay you see now everything is falling into place but also i don't know i feel like it's too close to the left and too close to the right here so i'm actually going to change the padding on the sides to be 16 pixels here and 16 pixels here and that looks a little bit nicer now let's try it again look at that it looks so good right now if i want to to this whole frame that has an outer layout i can also add a coordinate radius look at it now it has a coordinate radius it looks really really nice and that's how you create a ui card also well hold on one last thing there's one more thing i'm actually going to change this to use like a light gray i'm not liking that one just so it looks a little bit lighter maybe this one also i'm going to like change it to light gray that looks nicer look at that so yeah that's how you build a ui card using auto layout pretty it looks pretty simple but it has a lot of little details that you have to take care of just so it's responsive and it feels elastic and you can just adapt it and play around with it the different sizes and it will always will always look right how cool this is part of a crash course on auto layout there are more lessons like this so just keep watching thank you
Info
Channel: Sketch Together
Views: 79,551
Rating: undefined out of 5
Keywords: ui design, ux design, user experience, tutorial, walk-through, how-to, graphic design, user interface
Id: wuhgLGLrMoM
Channel Id: undefined
Length: 12min 59sec (779 seconds)
Published: Tue Dec 01 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.