To use it, you just need to find all the elements you need, and then pass it to the class.
- Text value print in last span in the component.
- No id attribute required for input.
- Input maintains checked attribute.
- Attention!!! Radio buttons must have the same value in the name attribute in the input tag.
<div class="Radio">
<input type="radio" class="Radio__input" name="radio" />
<div class="Radio__radio">
<div class="Radio__fill" data-id="radioInput"></div>
</div>
<span class="Radio__text">Radio button</span>
</div>
That's all! Enjoy this ( ͡°( ͡° ͜ʖ( ͡° ͜ʖ ͡°)ʖ ͡°) ͡°)