In the Figmaster - Lessons Figma file, open the 3.8 Accordion page.
Introduction
In the next three chapters, I will show you how to document components and their states in our design system. Let's start by preparing the page.
Step 1. Page
Prepare a documentation page for the Accordion. Remember to change the title in the Header, name of the Frame, and Menu Item states. Don't forget to link to the 2.1 Accordion page in the Header. The Group title text should be changed to Component.
Step 2. Component Wrapper
- Create a text layer with Label text inside somewhere on the canvas.
- Change its style to Text M / Medium.
- Set its color to Neutral/90.
- Create a Rectangle below that is 100x100 px.
- Change its fill color to Neutral/20.
- Group the rectangle and apply the auto layout.
- Rename it to Wrapper.
- In the auto layout panel:
- Direction: Horizontal.
- Padding (all sides): 24 px.
- Alignment: Center - Center.
- Move the Wrapper 16 px under the Label text.
- Group both the Label and Wrapper and apply the auto layout.
- Rename it to Component Wrapper
- Having the group selected, press Enter to select both items inside.
- Set their Resizing (width) property to Fill container.
Step 3. Accordion
- Copy the Component Wrapper.
- Paste it inside the Content > Group.
- Set the Component Wrapper's Resizing (width) property to Fill container.
- Find the Accordion Group in the Assets panel.
- Drop it in the Wrapper group inside the Component Wrapper.
- Set the Accordion Group's Resizing (width) property to Fill container.
- Change the Label text to Group.
Awesome! Now copy the entire Accordion page and proceed to the next chapter.