tailwindlabs / tailwindcss-custom-forms

A better base for styling form elements with Tailwind CSS.
https://tailwindcss-custom-forms.netlify.app/
MIT License
1.55k stars 72 forks source link

Ability to render `icon` on unchecked radios and checkboxes #72

Open hacknug opened 4 years ago

hacknug commented 4 years ago

I'm working on two different sites (designed by different folks) and for both I had to implement this kind of radio input:

radio_emptyradio_filled

Due to icon only being applied to :checked elements, I couldn't rely on it to style the input. Given it automatically escapes the SVG code and let's us take advantage of iconColor, it would be great if we could use it to add a bg-image to all radios regardless of their state.