Checkbox Pop
A copy-paste micro-interactions component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.
Micro-interactionsHTMLCSSany framework
Copy into your project
HTML
<label class="nuda-checkbox-pop">
<input type="checkbox" />
<span class="nuda-checkbox-pop__box">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round">
<polyline points="20 6 9 17 4 12"/>
</svg>
</span>
<span class="nuda-checkbox-pop__label">Pops with spring</span>
</label>CSS
.nuda-checkbox-pop {
display: inline-flex;
align-items: center;
gap: 10px;
cursor: pointer;
user-select: none;
}
.nuda-checkbox-pop input {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
clip: rect(0,0,0,0);
overflow: hidden;
}
.nuda-checkbox-pop__box {
display: inline-flex;
align-items: center;
justify-content: center;
width: 24px;
height: 24px;
border: 2px solid #555;
border-radius: 7px;
color: #09090b;
transition: background .2s,border-color .2s,transform .3s cubic-bezier(.34,1.56,.64,1);
}
.nuda-checkbox-pop__box svg {
width: 15px;
height: 15px;
stroke-dasharray: 24;
stroke-dashoffset: 24;
transition: stroke-dashoffset .3s ease .05s;
}
.nuda-checkbox-pop input:checked+.nuda-checkbox-pop__box {
background: #e4ff54;
border-color: #e4ff54;
transform: scale(1.12);
}
.nuda-checkbox-pop input:checked+.nuda-checkbox-pop__box svg {
stroke-dashoffset: 0;
}
.nuda-checkbox-pop input:focus-visible+.nuda-checkbox-pop__box {
outline: 2px solid #e4ff54;
outline-offset: 3px;
}
.nuda-checkbox-pop__label {
color: #fafafa;
font-size: 13px;
}
@media (prefers-reduced-motion:reduce) {
.nuda-checkbox-pop__box,.nuda-checkbox-pop__box svg {
transition: none;
}
}
How to use Checkbox 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.