Radio Pop
A copy-paste toggles & inputs component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.
Toggles & InputsHTMLCSSany framework
Copy into your project
HTML
<!-- Radio Pop — inner dot pops in with a spring on select -->
<label class="nuda-radio-pop">
<input type="radio" name="ship" checked />
<span class="nuda-radio-pop__circle"></span>
<span class="nuda-radio-pop__label">Standard</span>
</label>
<label class="nuda-radio-pop">
<input type="radio" name="ship" />
<span class="nuda-radio-pop__circle"></span>
<span class="nuda-radio-pop__label">Express</span>
</label>CSS
.nuda-radio-pop {
display: inline-flex;
align-items: center;
gap: 10px;
cursor: pointer;
user-select: none;
}
.nuda-radio-pop input {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
clip: rect(0,0,0,0);
overflow: hidden;
}
.nuda-radio-pop__circle {
position: relative;
display: inline-flex;
align-items: center;
justify-content: center;
width: 22px;
height: 22px;
border: 2px solid #555;
border-radius: 50%;
transition: border-color .25s ease;
}
.nuda-radio-pop__circle::after {
content: '';
width: 11px;
height: 11px;
border-radius: 50%;
background: #e4ff54;
transform: scale(0);
transition: transform .3s cubic-bezier(.34,1.56,.64,1);
}
.nuda-radio-pop input:checked+.nuda-radio-pop__circle {
border-color: #e4ff54;
}
.nuda-radio-pop input:checked+.nuda-radio-pop__circle::after {
transform: scale(1);
}
.nuda-radio-pop input:focus-visible+.nuda-radio-pop__circle {
outline: 2px solid #e4ff54;
outline-offset: 3px;
}
.nuda-radio-pop__label {
color: #fafafa;
font-size: 14px;
}
@media (prefers-reduced-motion:reduce) {
.nuda-radio-pop__circle,.nuda-radio-pop__circle::after {
transition: none;
}
}
How to use Radio Pop
Paste the HTML where you need it and the CSS into a global stylesheet (or a <style> tag). Every class is prefixed nuda- so it never collides with Tailwind or your own styles. Tweak the CSS custom properties to match your design system.
Works in React, Vue, Svelte, Astro, Next.js, Nuxt, Laravel Blade, Django, Rails — or a single .html file. No npm install, no build step.