In the Figmaster - Lessons Figma file, open the 2.16 Tooltip page.
Introduction
Tooltips display additional information upon click, hover, or focus. The information should be contextual, useful, and nonessential. Let's create a simple tooltip.
Step 1. Tooltip Trigger
- Create a text layer with a "Tooltip Trigger" phrase inside.
- Set it to Text M/Medium and Neutral/100.
- Add Icon / Info 4 px on the right of the text.
- Change the icon size to 20x20 px.
- Set its color to Neutral/100.
- Group the elements and apply the auto layout.
- Rename the group to Tooltip Trigger.
- In the Auto layout panel, set the Alignment to Left - Center.
- Press CTRL + ALT + K to create a component.
Step 2. Tooltip Content
Part 1. Content
- Create a text layer with this placeholder text inside: Assertively deploy resource maximizing supply chains rather than highly efficient information. Progressively leverage other's installed base resources whereas tactical.
- Text color: Neutral/10.
- Text style: Text S/Regular.
- Select the text and press CTRL + ALT + T to align it to the center.
- Group it and apply auto layout.
- Rename it to Content.
- Padding (all sides) should be 8 px.
- Color fill: Neutral/100.
- Corner radius: 4 px.
- Effect: Shadow 2.
- Set the Resizing (width) property to Fill container.
- Resize to Content group, so it's 280 px wide.
Part 2. Arrow
- Open the Polygon tool. This Shape tool does not have a Keyboard shortcut, but we can quickly open it from the top left panel of the Figma UI. It's under Shape tools. You can also open the search menu with CTRL + / and type in Polygon to open it.
- Click on the canvas to create a triangle.
- Rename it to Arrow.
- Press CTRL + E to Flatten the triangle.
- Set its color to Neutral/100.
- Resize it so its 16 px wide and 8 px high.
- Rotate it 180 degrees, so the top is pointing downwards.
Part 3. Grouping it together
- Move the Arrow 0 px below the Content group.
- Select both elements and align them horizontally.
- Group it and apply the auto layout.
- Rename it to Tooltip Content.
- In the auto layout panel, set the Alignment to Top - Center.
- Press CTRL + ALT + K to create a component.
Great work! Let's move on to the last chapter of this module!