Hi everyone, in this video we're going to look at... minimum and maximum sizes in Figma... so I've got a button here, it's an Auto layout, if I make it smaller... eventually, it can't get any smaller, it's got a minimum width... and likewise, I can type lots of stuff, and eventually it won't get any bigger... it's called Min and Max Widths, great for things like buttons...
but you can use it on anything as long as it's an Auto layout... let me show you how to make it. Hi everyone, this is an updated video... because they've just released a better Min/Max... there was a hack to do it before, so things might look a tiny bit different... so what we're going to do is, like normal, an Auto layout button...
can get really small or really big, so we want to add that minimum and maximum... to do it, don't do it to the text box, do it to the parent... remember, you can hit '\', so you get the parent, the Auto layout here... and mine's an Auto layout, yes... and the new button is, over here, under Width, there is this drop down now... and you can add Min and add Max, that's it...
just make sure it's to the outside and not the text box on the inside. So let's add a minimum, what should your minimum be? It's up to you... it's really common for 44 pixels to be a minimum button size... and 32 for an icon, just kind of like... people need to be able to touch it, especially on a phone, great...
let's look at the maximum, so let's go, drop down, let's... not that one, let's go back up to 'Width', and say, add a 'Maximum Width'... how big? I'll just use multiples of 8... I have no idea what a good size for a giant button is, but 160 seems about right... and now I can start typing, and it will keep going and eventually break.
So I've got a maximum size, which is awesome... let's center our text... and what I want to do is just make you aware that-- I'm going to grab a frame... and I'm going to draw out something that's kind of the same size as this... what you'll notice is that, when they do minimum and maximum on the widths... they include the padding...
you can see there, that's 44, like my minimum was there... but it doesn't include the Drop Shadow, the Drop Shadow here is... I just made something fancy... well, it's just 2x2 pixels with no blur... it gives you that kind of really cuboid Drop Shadow... but it does not get included in the frame.
The other thing to note is, let's give it a Fill color... I'm not sure why I got a field color, but this here... a frame can't have minimum and maximum at the moment... neither can a plain old text box, neither can a rectangle... it has to be an Auto layout, which is this option here... remember, you can be an auto layout...
now I can have the drop down for Min/Max. Another thing you can do, because this is the Advanced course... is you can drag it to a size... you've already got existing buttons on your design... they're already the right size, what you can do is go up to here... make sure it's an Auto layout...
then under width you can say, I'm going to add a minimum width... but I'm going to drop it down again and say... set it to the current width, whatever you've got... so that'll use, yeah, the existing dimensions for width... and you can do the same thing for max. We've only done width but obviously height works the exact same way...
and if you're like, "What are those diamonds... they've been in the course, and Dan hasn't mentioned them"... they're kind of new, let's have a look at one, frame... I'm going to cover these later in the course, called variables... it's a new thing, there's a whole section on that later in the course... so we'll get to the little hexagons, they're not diamonds, there you go.
That's minimum and maximum sizing in Figma, the new version... little side note is, guess how long it lasted, that hack... the course comes out in about... I don't know, 10 hours from now... course is not even released... and the new updates have made me go back and re-record the Min/Max video...
good work, Figma, you guys wait till I record stuff, then go and change it... anyway, it's up to date now, enjoy... I'll pass you back to regular Dan, who you know, and love... I'm future Dan, back to regular Dan, bye.