In the Figmaster - Lessons Figma file, open the 2.17 Menu page.
Introduction
In this chapter, we'll create a simple menu component. Menus provide access to destinations in your app.
Step 1. Menu Item Primary
Create a Menu Item Primary component with variants. Look at the screenshots to determine the styles and auto layout settings. The Menu Item text inside should have the Fill container (width) applied. The icon on the left should be Icon / CirclesThreePlus. The icon on the right should be Icon / CaretDown.
Step 2. Menu Item Secondary
Create a Menu Item Secondary component with variants. Look at the screenshots to determine the styles and auto layout settings. The Menu Item text inside should have the Fill container (width) applied.
Step 3. Menu Header
- Duplicate the Logo component from the Resources frame and drop it on the canvas.
- Group it and apply the auto layout.
- Rename it to Header.
- In the auto layout panel, set the padding (all sides) to 24 px.
- Set the Alignment to Left - Center.
- Resize the Header, so it's 248 px wide.
Step 4. Menu List
- Grab the Menu Item Primary from the Assets Panel and drop it on the canvas.
- Having the Menu Item Primary selected, in the Instance panel, set the following properties:
- Icon to ON.
- Dropdown to ON.
- State to Active.
- Open the Assets panel again and drop the Menu Item Secondary 4 px below the Menu Item Primary.
- Duplicate it, so there are six Secondary items below.
- Set the first Menu Item Secondary's state to Active.
- Select all Menu Items and duplicate them 4 px below the last item.
- Select all Menu Items and group them.
- Rename it to List.
- Apply the auto layout and set the following properties:
- Spacing between items should be 4 px.
- Padding Top: 16 px.
- Padding Left and Right: 12 px.
- Padding Bottom: 24 px.
Step 5. Grouping everything together
- Move the List 0 px below the Header.
- Select both groups and align them horizontally (ALT + H).
- Group them and apply the auto layout.
- Rename the group to Menu.
- Set background Fill to Neutral/20.
- Resize the Menu, so it's 900 px high.
- Having the Menu selected, press Enter to select the elements inside.
- Set their Resizing (width) property to Fill container.
- Select the List group inside and press Enter.
- Set the Resizing (width) property to Fill container for these items too.
- Resize it back to 248 px.
- Select Menu and press CTRL + ALT + K to create a component.
Awesome work! Your Menu component is ready. We will use it in the next Module to create our documentation pages. In the next chapter, you can find some theoretical resources on design systems and components.