In the Figmaster - Lessons Figma file, open the 2.11 Radio Button page.
Introduction
In this chapter, you will create a Radio Button component. Radio buttons are used when you have a group of mutually exclusive choices, and only one selection from the group is allowed. This chapter will be very similar to the 2.5 Checkbox, so if you feel you can do it by yourself, go to the Figmaster Design System, open the Radio Button page, and recreate it here in the Lessons File. If not, follow the instructions below.
Step 1. Radio Button - Off
- Create an ellipse (O to open the ellipse tool) with the following properties:
- Size: 20x20 px.
- Fill color: Neutral/10.
- Stroke: 1 px Neutral/50 Inside.
- Group it and change the group into a frame (Dropdown in the top right corner of the Figma UI).
- Rename it to Radio Button.
- Group it again and add an auto layout.
- Rename it to Radio Button / Off / Default.
- In the auto layout properties, set the Spacing between items to 8px.
- Alignment should be set to Left - Center.
- Duplicate it 32 px to the right.
- Change the copy's name to Radio Button/ Off / Hover.
- Change its stroke color to Primary / Main.
- Duplicate it 32 px to the right.
- Change the copy's name to Radio Button / Off / Focused.
- Change the corner radius to 40 px.
- Add a 3 px Main/Focus Outside stroke.
- Duplicate the Radio Button / Off / Default 32 px to the right of the Focused state.
- Change the copy's name to Radio Button / Off / Disabled.
- Change the Fill color to Neutral/20.
- Change the Stroke color to Neutral/40.
Step 2. Radio Button - On
- Duplicate all checkboxes 32 px to the bottom.
- Open the Rename modal.
- In the Match (optional) field, type in Off.
- In the Rename to field, type in On and press Enter.
- Create an Ellipse (O) with the following properties:
- Fill color: Primary/Main.
- Size: 10x10 px.
- Copy the ellipse.
- Paste it in the center of each Radio Button - On frame.
- Change the color of this ellipsis to Neutral/50 inside the Radio Button / On / Disabled.
Step 3. Component and variants
- Select all Radio Buttons.
- Create multiple components.
- Having the component selected, press the Combine as variants button.
- Rename Property 1 label to Checked.
- Rename Property 2 label to State.
- Rearrange the states to Default, Hover, Focused, Disabled.
- Select all Focused components.
- In the Stroke panel, add 3 px Outside stroke with Primary/Focus color style.
Step 4. Radio Button with Label
Create a Radio Button + Label component following the methods we used in Step 5 in the 2.5 Checkbox chapter.
You're doing fantastic! In the next chapter, you will do everything by yourself. I know you are ready!