In the Figmaster - Demo Lessons Figma file, open the Demo Lesson 2 - Dropdown Menu page.
Step 1. Dropdown Menu Item - the base
In this step, we'll create the base for our dropdown menu item. We'll use color styles from the previous lesson and text styles (you'll learn how to make them in the full course). OK! Let's begin.
- Press T to open the Text tool and type 'Dropdown Option' in Step 1 - Playground frame.
- Select the text you've just created and apply Text 14 - Regular style to it.
- Then apply color style Neutral / 90.
- Press CTRL + G to group it.
- Press SHIFT + A to apply auto layout.
- In the auto layout panel on the right, open the alignment and padding menu.
- Apply the following values:
- Left and Right Padding: 16 px
- Top and Bottom Padding: 6 px
- In the same alignment and padding menu, set the alignment (blue lines) to Left - Center.
- Close the menu and rename the selected item to 'Dropdown Menu Item'.
- Copy the item and paste it in Step 2 - Playground frame.
Step 2. Dropdown Menu Item - states
Let's create states for our Dropdown Menu Item.
- Select Dropdown Menu Item while holding SHIFT + ALT and move it 8 px to the bottom to duplicate it.
- Press CTRL + D four times to duplicate the item, so there are six copies in total.
- Select the first item on the top and rename it (CTRL + R) to 'Dropdown Menu Item / Default'.
- Select the second item and change it's fill color (background color) to Neutral / 20. Pro tip: Did you know that you can select next/previous items with the keyboard? When the item is selected: TAB to select the next item in the layers panel. SHIFT + TAB to select the previous item.
- Rename the second item to 'Dropdown Menu Item / Hover'.
- Select the third item (SHIFT + TAB) and change its fill color (background color) to Neutral / 20 and add an inside stroke of 2 px. Apply the Neutral / 100 color style to the stroke.
- Rename the third item to 'Dropdown Menu Item / Focused'.
- Select the fourth item and change it's fill color (background color) to Neutral / 30.
- Rename the fourth item to 'Dropdown Menu Item / Pressed'.
- Select the fifth item and change its fill color (background color) to Neutral / 40.
- Select the text inside and change its text style to Text 14 / Medium and color style to Neutral / 100.
- Rename the fifth item to 'Dropdown Menu Item / Selected'.
- Select the last item and change its text color to Neutral / 60.
- Rename the last item to 'Dropdown Menu Item / Disabled'.
- Copy all items from Step 2 - Playground frame and paste them into Step 3 - Playground frame.
Step 3. Dropdown Menu Item - components & variants
Now it's time to convert our Dropdown Menu Items into components and variants!
- Select all items in Step 3 - Playground frame.
- Open the component menu dropdown at the top center of the Figma UI (four squares icon).
- Select 'Create multiple components' option.
- On the right, in the variants panel, press 'Combine as Variants' button.
- In the variants panel, rename 'Property 1' to 'State'.
- In the variants panel, rearrange states with your mouse in the following order: Default, Hover, Focused, Pressed, Selected, Disabled.
Step 4. Dropdown Menu Separator
In this step, we'll create a dropdown menu separator component. We'll use it to separate the dropdown menu items that are within different action groups.
- Open the pen tool (P).
- Click somewhere in Step 4 - Playground frame.
- Move the cursor ~100 px to the right while holding SHIFT and click again to create a line.
- Press ENTER to finish the vector line.
- Apply the Neutral / 40 color to the vector's stroke.
- Group it (CTRL + G) and apply the auto layout (SHIFT + A).
- Rename the frame to 'Dropdown Menu Separator'.
- In the auto layout panel, open the alignment and padding menu.
- Apply the following values: Top and Bottom Padding: 4px.
- Select the line inside the frame and in the Resizing panel, set its width property to Fill container.
- Select the Dropdown Menu Separator frame and press CTRL + ALT + K to create the component.
Step 5. Dropdown Menu
Let's use the components we've just created to build the dropdown menu. In this step, we'll use the shadow style (you will learn how to make it in the full version of the course).
- Open the assets panel (ALT + 2).
- Find and grab the Dropdown Menu Item component from the Assets panel and drop it in Step 5 - Playground area.
- Select the component while holding SHIFT + ALT and move it 0 px to the bottom to duplicate it.
- Duplicate it (CTRL + D), so there are five items.
- Select all items and group them (CTRL + G).
- Rename the group to 'Dropdown Menu'.
- Apply the auto layout to the group (SHIFT + A).
- Find and grab the 'Dropdown Menu Separator' from the Assets panel and drop it inside the dropdown menu frame before the last dropdown menu item.
- Select the Dropdown Menu and press Enter to select all items inside.
- In the Resizing panel, set width from Mixed to Fill container.
- Click somewhere on the canvas to deselect these items and select the Dropdown Menu once again.
- In the auto layout panel on the right, open the alignment and padding menu and apply the following values: Top and Bottom Padding: 4px.
- Apply the Neutral / 10 color style to the Dropdown Menu's fill.
- Add 1 px stroke with Neutral / 40 color style and set it to Outside.
- Set the corner radius of the Dropdown Menu to 4 px.
- Add 'Shadow 2' style from the effects panel.
- Select the Dropdown Menu and press CTRL + ALT + K to create the component.
Step 6. Dropdown Button - the base
You are doing great! Now it's time to create the trigger button for our dropdown menu.
Part 1. Setting up the base
- Press T to open the Text tool and type 'Dropdown' in Step 6 - Playground frame.
- Select the text you've just created and apply Text 14 - Medium style to it.
- Then apply the color style Neutral / 100 to this text.
- Press CTRL + G to group it.
- Press SHIFT + A to apply auto layout.
- In the auto layout panel, set the Spacing between items to 4 px.
- In the alignment and padding menu, apply the following values:
- Padding Left to 16 px.
- Padding Right to 12 px.
- Top and Bottom Padding to 6 px.
- In the same alignment and padding menu, set the alignment (blue lines) to Left - Center.
- Close the menu and rename the selected item to 'Dropdown Button'.
- Apply the Neutral / 10 color style to the Dropdown Button’s fill.
- Apply the 1 px stroke and set its color to Neutral / 50.
- Set its border radius to 4 px.
- Apply the Shadow 1 style to Dropdown Button.
Part 2. Adding the icon
In this part, we'll use the Icon component (you will learn how to set it up in the full version of the course).
- Open the Assets panel (ALT + 2).
- Find and grab the 'Icon / caret-down' from the Assets panel and drop it inside the Dropdown Button frame on the right.
- Change the size of the icon to 16x16 px. (Hold SHIFT and resize it with your mouse or use the top right panel's size properties).
- Press CTRL + C to copy the Dropdown Button.
Step 7. Dropdown Button - states
- Create five copies of the Dropdown Button in Step 7 - Playground (duplicate just like we did in Step 2).
- Select the first item on the top and rename it (CTRL + R) to 'Dropdown Button / Default'.
- Select the second item and change its fill color (background color) to Neutral / 20.
- Rename the second item to 'Dropdown Button / Hover'.
- Select the third item and change its fill color (background color) to Neutral / 20 and add an inside stroke of 2 px. Apply the Neutral / 100 color style to the stroke.
- Rename the third item to 'Dropdown Button / Focused'.
- Select the fourth item and change its fill color (background color) to Neutral / 30.
- Apply the Neutral / 40 color style to its stroke.
- Remove the shadow effect from this item.
- Rename the fourth item to 'Dropdown Button / Pressed'.
- Select the last item and change its text and icon fill color to Neutral / 60.
- Remove the shadow effect from this item.
- Rename the last item to 'Dropdown Button / Disabled'.
- Copy all items and paste them to Step 8 - Playground frame.
Step 8. Dropdown Button - components & variants
You are doing well! OK, the last step. Let's create the components and translate them into variants. This step is similar to Step 3, so if you remember how to create components & variants, do it yourself. 💪
- Select all items in Step 8 - Playground frame.
- Open the component menu dropdown at the top center of the Figma UI (four squares icon).
- Select 'Create multiple components' option.
- On the right, in the variants panel, press 'Combine as Variants' button.
- In the variants panel, rename 'Property 1' to 'State'.
- In the variants panel, rearrange states with your mouse in the following order: Default, Hover, Focused, Pressed, Disabled.
Summary
Great work! You've just designed your first Figmaster component for our design system! Now you can access the components from the assets panel. In the full version of the course, we will also create documentation pages and document our components' states. You will also learn how to efficiently use and customize the components.
I want to thank you for reading and doing the exercises. I hope you've learned something new today. Please let me know what you think about this lesson. I would love to hear your feedback! Do you have any suggestions or remarks? Reach out to me via email at hello@figmaster.co.
Don't forget to tell your friends and teammates about the Figmaster and make sure to give it a like on the Figma Community ♥! Thanks! 🎉