I want to use images as radio buttons but couldn't find any source. Any help will be appreciated.
Asked
Active
Viewed 1,304 times
2
-
Is there a particular UI library you are using? – Matthew Kwong May 24 '21 at 09:03
-
i'm using material-ui – touchngo May 24 '21 at 09:09
2 Answers
1
You need to first hide your [type=radio] and then wrap your image and input tag inside the label.
Following link could be helpful.
Neel Dsouza
- 1,138
- 2
- 11
- 26
0
Since the OP mentioned he is using Material-UI (you should add that tag next time BTW), take a look at the Radio documentation
There are icon and checkedIcon props, to which you can pass the corresponding images to.
Matthew Kwong
- 1,667
- 6
- 15