Onsen UI CSS Component Material Radio Button
Last Updated :
22 Jun, 2022
Onsen UI CSS is used to create beautiful HTML components. It is one of the most efficient ways to create HTML5 hybrid components that are compatible with both mobile and desktop.
Onsen UI CSS Component Material Radio Button is used to create the material radio button using Radio Button classes. To create the material Radio Button, we will use the below classes.
Onsen UI CSS Component Material Radio Button Classes:
- radio-button–material: This class is used to create the material radio button.
- radio-button–material__input: This class is used to create the material radio input.
- radio-button–material__checkmark: This class is used to create the material radio button checkmark.
Syntax:
<label class="radio-button radio-button--material">
<input type="radio" name="..."
class="radio-button__input
radio-button--material__input">
<div class="radio-button__checkmark
radio-button--material__checkmark">
</div>
...
</label>
Example 1: The following example demonstrates the Onsen UI CSS Component Material Radio Button.
HTML
<!DOCTYPE html>
< html >
< head >
< link rel = "stylesheet" href =
< link rel = "stylesheet" href =
< script src =
</ script >
</ head >
< body >
< center >
< h2 style = "color: green;" >
GeeksforGeeks
</ h2 >
< strong >
Onsen UI CSS Component Material Radio Button
</ strong > < br > < br >
< label class = "radio-button radio-button--material" >
< input type = "radio"
class="radio-button__input
radio-button--material__input"
name = "rdi" checked>
< div class="radio-button__checkmark
radio-button--material__checkmark">
</ div >
Java
</ label >
< label class = "radio-button radio-button--material" >
< input type = "radio"
class="radio-button__input
radio-button--material__input"
name = "rdi" >
< div class="radio-button__checkmark
radio-button--material__checkmark">
</ div >
Python
</ label >
</ center >
</ body >
</ html >
|
Output:
Example 2: The following example demonstrates the Onsen UI CSS Component Material Radio Button.
HTML
<!DOCTYPE html>
< html >
< head >
< link rel = "stylesheet" href =
< link rel = "stylesheet" href =
< script src =
</ script >
</ head >
< body >
< center >
< h2 style = "color: green;" >
GeeksforGeeks
</ h2 >
< strong >
Onsen UI CSS Component Material Radio Button
</ strong > < br > < br >
< label class = "radio-button radio-button--material" >
< input type = "radio"
class="radio-button__input
radio-button--material__input"
name = "rdi" checked>
< div class="radio-button__checkmark
radio-button--material__checkmark">
</ div >
Java
</ label >
< label class = "radio-button radio-button--material" >
< input type = "radio"
class="radio-button__input
radio-button--material__input"
name = "rdi" disabled>
< div class="radio-button__checkmark
radio-button--material__checkmark">
</ div >
Python
</ label >
< label class = "radio-button radio-button--material" >
< input type = "radio"
class="radio-button__input
radio-button--material__input"
name = "rdi" >
< div class="radio-button__checkmark
radio-button--material__checkmark">
</ div >
C++
</ label >
</ center >
</ body >
</ html >
|
Output:
Reference: https://onsen.io/v2/api/css.html#radio-button-category
Like Article
Suggest improvement
Share your thoughts in the comments
Please Login to comment...