Material Radio Buttons

Size
2,938 Kb
Views
30,360

How do I make an material radio buttons?

What is a material radio buttons? How do you make a material radio buttons? This script and codes were developed by Simeon Simeonoff on 17 September 2022, Saturday.

Material Radio Buttons Previews

Material Radio Buttons - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Material Radio Buttons</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <form class="cntr"> <div class="ig-control"> <input name="group" type="radio" id="unchecked" class="ig-control__radio"/> <label for="unchecked">Unchecked</label> </div> <div class="ig-control"> <input name="group" type="radio" id="checked" class="ig-control__radio" checked/> <label for="checked">Checked</label> </div> <div class="ig-control"> <input name="group2" type="radio" id="disabled" class="ig-control__radio" checked disabled/> <label for="disabled">Disabled Checked</label> </div> <div class="ig-control"> <input name="group" type="radio" id="disabled_unchecked" class="ig-control__radio" disabled/> <label for="disabled_unchecked">Disabled Unchecked</label> </div>
</form>
</body>
</html>

Material Radio Buttons - Script Codes CSS Codes

html { box-sizing: border-box;
}
*,
*:before,
*:after { box-sizing: inherit;
}
body { font-size: 100%; font-size-adjust: 0.58; font-family: 'Titillium Web', sans-serif; -webkit-font-smoothing: antialiased;
}
.cntr { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
}
.ig-control { margin: 10px 0; -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none;
}
.ig-control__radio:not(:checked),
.ig-control__radio:checked { opacity: 0; position: absolute; margin: 0; z-index: -1; width: 0; height: 0; overflow: hidden; left: 0; pointer-events: none;
}
.ig-control__radio ~ label { display: inline-block; position: relative; cursor: pointer; height: 20px; line-height: 20px; font-size: 1rem; color: #484848; padding-left: 36px;
}
.ig-control__radio ~ label:before,
.ig-control__radio ~ label:after { position: absolute; content: ''; width: 20px; height: 20px; left: 0; border: 2px solid transparent; border-radius: 50% 50%;
}
.ig-control__radio ~ label:before { backface-visibility: hidden; transform: translateZ(0); transition: all .2s ease-in;
}
.ig-control__radio:not(:checked) ~ label:before { transform: scale(0);
}
.ig-control__radio:not(:checked) ~ label:after { border: 2px solid #757575;
}
.ig-control__radio:checked ~ label:before { border: 2px solid #0375BE; background-color: #0375BE; transform: scale(0.5);
}
.ig-control__radio:checked ~ label:after { border: 2px solid #0375BE;
}
.ig-control__radio:disabled ~ label { pointer-events: none; color: #D1D1D1;
}
.ig-control__radio:disabled:not(:checked) ~ label:after { border: 2px solid #D1D1D1;
}
.ig-control__radio:disabled:checked ~ label:before { background-color: #D1D1D1; border: 2px solid #D1D1D1;
}
.ig-control__radio:disabled:checked ~ label:after { border: 2px solid #D1D1D1;
}
Material Radio Buttons - Script Codes
Material Radio Buttons - Script Codes
Home Page Home
Developer Simeon Simeonoff
Username simeonoff
Uploaded September 17, 2022
Rating 3
Size 2,938 Kb
Views 30,360
Do you need developer help for Material Radio Buttons?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Simeon Simeonoff (simeonoff) Script Codes
Create amazing sales emails with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!