Skip to main content
Emad_El_Sammad
Sep 2, 2022 4:55 PM UTC
Question

How to deselect a radio button when I select another radio button? (when using variants)

I’m in Figma creating a variant component for a radio-button that asks a user to choose only 1 type of fruit between “Apple”, “Banana” or “Orange”.

I want to make the component interactive in a way that an item gets deselected when another item gets selected (which is how Radio buttons work). My problem is that when I prototype it users click on all items and they all get selected 😦 Please help!

This topic has been closed for replies.

6 replies

ntfromchicago
New Participant
Sep 2, 2022 5:24 PM UTC

You’ll probably have to make the radio button group (so all three choices listed together) itself a variant, with a version of each selected.

Emad_El_Sammad
Sep 2, 2022 5:50 PM UTC

I see. So there isn’t a neater way to do it? I was trying to avoid creating 12 versions of same thing in my design system. (I have 12 radio item and they can easily go to 20)

ntfromchicago
New Participant
Sep 2, 2022 8:24 PM UTC

Unfortunately no neater way that I’m aware of (at least not without significant hackiness … if you want to see that solution, LMK). I would encourage you to vote on this feature request that might address this use case. Prototyping | Conditional logic & variables

ntfromchicago
New Participant
Sep 7, 2022 2:54 PM UTC

FYI, I published my “protohack” for an alt way to do radio button groups without variants: Advanced Figma Protohacking. Episode 1: Radio Button Groups | by Nelson Taruc | Sep, 2022 | Medium

Emad_El_Sammad
Sep 7, 2022 3:07 PM UTC

This is very interesting and look very organized. I’ll read it again in details. Have you thought of making a tutorial video of it?

JF_Brito
Aug 24, 2023 6:19 PM UTC

may it possible now with variables and conditions?