In the Figmaster - Lessons Figma file, open the 3.2 Documentation Page page.
Introduction
Let's use the components we've created in the previous chapter and set up a documentation page. Doing so will help us document our styles and components faster because we'll use it as a template for all pages.
Step 1. Menu and Header
- Open the Frame tool (F).
- In the Frame panel on the right, click on Desktop > Macbook Pro (1440x900). The new frame will be created on the canvas.
- Rename it to Documentation Page.
- In the Assets panel, find Documentation Components / Menu.
- Drop it inside the Documentation Page.
- Move the Menu to the top left corner.
- Resize the Documentation Page to match the Menu's height.
- In the Assets panel, find Documentation Components / Header.
- Drop it inside the Documentation Page.
- Move it to the top right corner.
Step 2. Group and Content frames
Part 1. Group
- Open the text tool and click somewhere under the Header of the Documentation Page.
- Create a text layer with Group title text inside.
- Change its text style to Heading/M.
- Change its fill to Neutral/100.
- Group it and apply auto layout.
- Rename this group to Group.
- In the Auto layout panel:
- Direction: Vertical.
- Spacing between items to 32 px.
- Padding (all sides) to 0 px.
- Select the text inside and change its Resizing (width) property to Fill container.
Part 2. Content
- Select the Group.
- Group it and change the new group's name to Content.
- Apply the auto layout to the Content group.
- In the Auto layout settings:
- Direction: Vertical.
- Spacing between items: 48 px.
- Padding (all sides): 48 px.
- Select the Group inside and change its Resizing (width) property to Fill container.
Step 3. Header and Content
- Select the Header and Content elements.
- Apply auto layout to group them.
- Rename the group to Header + Content.
- In the Auto layout settings:
- Direction: Vertical.
- Spacing between items: 0 px.
- Padding (all sides): 0 px.
- Select both Header and Content groups inside.
- Change their Resizing (width) property to Fill container.
Step 4. Page
- Select Documentation Page and apply the auto layout.
- Select the Menu inside.
- In the Resizing panel, set the Height property to Fill container.
- Select the Header + Content frame.
- Change its Resizing (width) property to Fill container.
- Select the page and make it a component.
Awesome work! Now, our documentation page will resize accordingly to the content inside! Let's start documenting!