Skip to content

DZ8540/Custom-radio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DZ Custom-radio

To use it, you just need to find all the elements you need, and then pass it to the class.

Instruction:

  1. Text value print in last span in the component.
  2. No id attribute required for input.
  3. Input maintains checked attribute.
  4. Attention!!! Radio buttons must have the same value in the name attribute in the input tag.

Example

<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>

End

That's all! Enjoy this ( ͡°( ͡° ͜ʖ( ͡° ͜ʖ ͡°)ʖ ͡°) ͡°)