The Input component is a way by which user interacts with the webiste. We can take input from user either in writing or let user select from a list of options. Below are the various input components:
1. Basic input
2. Input with validation: used to tell user whether a input follows a set of rules or not.
3. Radio button: Radio buttons are normally presented in groups. Only one radio button in a group can be selected at the same time.
4. Checkbox: Checkbox is used to take multiple inputs for a same field.
<divclass="input-container"><divclass="input-name"><labelfor="name">Name:</label><inputtype="text"id="name"class="name-input-field input-field-right"><smallclass="right-input-validation">This username is valid</small></div><divclass="input-password"><labelfor="password">Password:</label><inputtype="text"id="password"class="password-input-field input-field-wrong"><smallclass="wrong-input-validation">The username and password don't match</small></div></div>
3. Radio Button:
Please select your gender:
<divclass="input-container"><div><p>Please select your gender:</p><inputtype="radio"name="gender"value="male"id="male"><labelfor="male">Male</label><inputtype="radio"name="gender"value="female"id="female"><labelfor="female">Female</label><inputtype="radio"name="gender"value="others"id="others"><labelfor="others">Others</label></div></div>
4. Check Box:
Please select the type:
<divclass="input-container"><div><p>Please select the type:</p><inputtype="checkbox"name="shoes"id="sports"value="sports"><labelfor="sports">Sports Shoes</label><inputtype="checkbox"name="shoes"id="boots"value="boots"><labelfor="boots">Boots</label><inputtype="checkbox"name="shoes"id="formal"value="formal"><labelfor="formal">Formal Shoes</label><inputtype="checkbox"name="shoes"id="sneakers"value="sneakers"><labelfor="sneakers">Sneakers</label></div></div>
5. Dropdown:
<divclass="input-container"><labelfor="payment">Select your mode of payment:</label><selectname="payment"id="payment"class="input-dropdown"><optionvalue="upi">UPI</option><optionvalue="net">Net Banking</option><optionvalue="credit">Credit Card</option><optionvalue="debit">Debit Card</option><optionvalue="wallet">Wallet</option><optionvalue="paypal">Paypal</option></select></div>