Skip to main content
Question

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

  • September 2, 2022
  • 6 replies
  • 4043 views

Emad_El_Sammad

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

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

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

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

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

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
  • 1 reply
  • August 24, 2023

may it possible now with variables and conditions?


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings