In the Figmaster - Lessons Figma file, open the 3.1 Documentation Components page.
Introduction
In this chapter, we'll create documentation components that we'll use in the next chapter to build a documentation template page. But first, we'll need a navigation menu and a header.
Step 1. Menu
- Open the Assets Panel (ALT + 2).
- Search for the Menu component and drop it on the canvas.
- Having the Menu selected, press CTRL + ALT + B to detach the instance.
- Change the first Menu Item Primary's text to Style Guide.
- Select its icon and change it to Icon / PaintBucket in the instances panel.
- Select the Menu Item Secondary below and change its text to Typography.
- Repeat the action to items below in the following order: Color, Layout & Spacing, Shadows (Elevation), Icons.
- Delete the last Menu Item Secondary under the icon item.
- Change the second Menu Item Primary's text to Components.
- Select its icon and change it to Icon / Stack in the instances panel.
- Select the Menu Item below.
- Duplicate it (CTRL + D), so there are 18 Menu Items in total.
- Rename the Menu Items in the following order: Accordion, Badge, Button, Card, Checkbox, Dropdown, Input, Menu, Modal, Notification, Radio Button, Select, Switch, Table, Tabs, Textarea, Tooltip.
- Resize the whole Menu frame, so it's 1208 px high.
- Add an Inner Shadow to the frame with the following values:
- X to -1.
- Y and Blur to 0.
- Color to E0E0E0 100%.
- Rename the Menu to Documentation Components / Menu.
- Press CTRL + ALT + K to create a component.
Step 2. Header
Part 1. Page title
- Create the text layer with Page title text inside.
- Change its style to Heading/L.
- Change its fill to Neutral/10.
Part 2. Button
- Open the Assets panel and find a Button component.
- Drop it on the right side of the Page title text layer.
- Change the Button's properties to:
- Content to Icon Text.
- Size to Normal.
- Type to Text.
- State to Default.
- In the Selection colors, change the color to Neutral/10.
- Change the Button's text to View main components.
- Change the icon to Icon / ArrowCircleUpRight.
Part 3. Group
- Select Page title and button and press SHIFT + A to group them and apply auto layout.
- Rename the group to Documentation Components / Header.
- Change its fill to Neutral/100.
- Add an Inner Shadow effect with the following values:
- X to 0.
- Y to 4.
- Blur to 0.
- Color to 4E31E4 100%.
- Select the group and set the following values in the Auto Layout panel:
- Spacing between items: 24 px.
- Alignment: Bottom - Left.
- Padding Top: 128 px.
- Padding Left, Right, and Bottom: 48 px.
- Select the group and resize it to 1192 px in width.
- Select the Page title text layer.
- Set its Resizing (width) property to Fill container.
- Select the group and make it a component.
Great job! We've created basic documentation components, and we'll use them to create a simple documentation page in the next chapter. Let's continue!