How To Create a Dropdown Menu in Figma!

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] thank you hi everyone and welcome to this new figma tutorial today we're gonna be creating this cool drop down menu and I honestly love doing this exercise because it was a great combination of the latest figma features like different type of variants combined with smart anime but without further Ado let's get right into it the first component that we're gonna build is our list element and for that I will start with a text and it will say something like Place holder and now I need an icon for my Chevron icon and I will look for iconify and I'll export this one then I'll come here and make this a component call it Chevron icon and then I will press option and drag an instant of this component here and then I will put these two under an auto layout now I want this Auto layout to have a width of 275 and I will Center this with a solid white background and add a top and bottom padding of 12 pixels then I will make this a little bit smaller I'll change it to 18. and now to make it look that is Center I need to add some padding here to make the text move a little bit to the center so I'll select here and add 20 pixels to my left and now let's make this a component and let's change the name to list element and create a new variant I will change the name of this Ryan to date let's keep the the first one to default and then the second one will be open and when it's open I want my Sharon icon to be flipped 180 degrees and now I also need to create my other list components that are my categories so for that I will need my icon to be to my left so I will create another variant but before that I will create a different property so this property will be icon position and the default value will be right then I will duplicate this one and I will move this one to the left and I will add new and I'll call this left and now since my icon is to my left I need to add some padding to my right so I'll select this one change this to zero and add 20 pixels here now I need to make it easy to change this icon later for that the instant swap property is very handy so I'll select my icon here and select here what it says create instant swap property and I'll call this icon and I will export more icons for my categories so now I want another and last variant that will be when this item is selected I will make this light gray and I will add a border to to the left so I'll select here add stroke to the left and I will make these four pixels and I had a proper problem with my properties here that's because I have repeated properties so I need to change these to selected and actually for for this one I don't want the background to be solid so I will make it full transparent now let's start the fun part that is our drop down menu and drag an instant of this component and I will change this one to select category then I will duplicate this three times there you go and of course I want this one to be icon left these two icon left and now since I create my instant swap property before it's very easy to change the icon I can come here and select the icon the first one will be house oops there's something wrong with our house and that's because I use this component to create the other ones so let's flip this again 0 here and these one two zero here and now let's see here that my house is fixed and of course I don't need this to be dark great this one also all changes to Black and now I need to fix my house that needs to be black cool and you can also create a text property and that will allow you to change your text here I will show you how it works so you come here select your text and here you can create text property so I will keep it text and default value will be placeholder and that will allow you to change the text right here and this will be houses Also let's change these to cars and I want the the icon to be the car of course and this one airplanes and the icon should be the airplane there you go and now before doing anything else I will change the names of these these elements here so later when we do the animation it will be easier for us to to keep the position of both so this one will be select daggery then this one will be house these will be cars or car and these will be airplane cool and now I'll select these four elements frame selection and add a solid background white background and here this one will have a border radius of 10 pixels and I will make this clip component so I don't have any anything that overflows my my main container and now I will make this a component and I need to have again two versions when it's closed and when it's open so I will create a new variant and I will change these again to state this will be close and this will be open cool and when it's closed of course I only want this to show my select category section so I will select these three and I will change the Y position to zero so before doing that I'll actually make it so that this one is on top of this one and this one on top of this one and that will be important for our accordion animation I'll make house to be on top car to be on top of airplane and select categories should be on top of the the three of those and the same for these variant that's because we want to have the impression that the elements go underneath the one that is on top so now I came back here selected three of this and change the Y to zero and now all then go underneath my select category and that's why I wanted this to have a solid background and now I can make the size of my frame to be in the size of my lace element and this one can be the open State there you go okay so let's add a bottom stroke for for the open version and this will be like a very light rate something like this and now we can add a an animation let's change this name to drop down and let's add an animation to come here to prototype connect these two and then when you click this one it will close the drop down menu again and I want this to be a smart anime dental and 500 milliseconds and the same when it closed back so gentle if I handle smart animate and now let's see how this looks so I'll create a frame here I will call this test oh add some some gray to the background something like this and some border radius cool so I'll select this one option and create an instance and put it here now let's see the Prototype I'm here when I click I have this bouncy effect that is really cool and now let's make it more interactive I will expand this select these two and create two variance by pressing option and dragging now I want these to be house so this will be the version where the house category is selected so this will be houses and this one should be selected so I will change these to state from open to selected and I want this to be houses there and now let's modify the animations when I click here I want to go here when I expand this one I wanted to go here I want to click here I want to go here okay so now let's go back to our animation click here and click go house and this one show was selected let's make this gray a little bit lighter so come here and our select here in design and let's make it a little bit lighter something like this cool and now I will do the other versions really fast because it's basically the same thing and this is how it looks at the end make sure to connect all the dots to have the right animation it looks kind of messy at the end but you have the end result that looks really nice here when you click house car airplane back to house and they have all the animations working and that's all I have for this video I hope you found it really helpful and if you want to learn more about components and variants I highly recommend my last week's video where I use it to create a navigation bar and if you want to learn more about product design in general follow me and see you on my next tutorial bye bye
Info
Channel: Product Sensei
Views: 8,153
Rating: undefined out of 5
Keywords:
Id: PVp1Ch7FUek
Channel Id: undefined
Length: 11min 37sec (697 seconds)
Published: Sat Nov 12 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.