Getekend vinkje
Real checkboxes where the tick is drawn as a line while the box briefly squashes and springs back; for consent, newsletter and preference questions in a form.
How to use it
- Paste the HTML where the forms & inputs should appear.
- Add the CSS to your stylesheet. All classes are prefixed, so nothing clashes with your own styles.
- Add the JavaScript and call init() with the element that contains the HTML.
<!-- Getekend vinkje · © 2026 NedDev BV · NedDev Lab-licentie (gratis gebruik, niet doorverkopen) · neddev.com/nl/lab/gebruik/#licentie -->
<div class="jouw-container">
<fieldset class="h4cb">
<legend class="h4cb__lg">Voordat we je offerte sturen</legend>
<label class="h4cb__row"><input class="h4cb__in" type="checkbox" checked><span class="h4cb__box" aria-hidden="true"><svg viewBox="0 0 24 24"><path class="h4cb__tick" pathLength="1" d="M5.5 12.5 L10 17 L18.5 7.5"/></svg></span><span class="h4cb__txt">Ik ga akkoord met de algemene voorwaarden</span></label>
<label class="h4cb__row"><input class="h4cb__in" type="checkbox"><span class="h4cb__box" aria-hidden="true"><svg viewBox="0 0 24 24"><path class="h4cb__tick" pathLength="1" d="M5.5 12.5 L10 17 L18.5 7.5"/></svg></span><span class="h4cb__txt">Bel mij terug op een werkdag</span></label>
<label class="h4cb__row"><input class="h4cb__in" type="checkbox"><span class="h4cb__box" aria-hidden="true"><svg viewBox="0 0 24 24"><path class="h4cb__tick" pathLength="1" d="M5.5 12.5 L10 17 L18.5 7.5"/></svg></span><span class="h4cb__txt">Stuur mij eens per maand de nieuwsbrief</span></label>
</fieldset>
</div>/* Getekend vinkje · © 2026 NedDev BV · NedDev Lab-licentie (gratis gebruik, niet doorverkopen) · neddev.com/nl/lab/gebruik/#licentie */
.h4cb{margin:0;padding:0 20px;border:0;min-width:0;font-family:'Switzer',sans-serif;color:#0a0a0a;display:flex;flex-direction:column;gap:12px}
.h4cb__lg{padding:0;margin-bottom:14px;font-size:16px;font-weight:600}
.h4cb__row{position:relative;display:flex;align-items:center;gap:12px;cursor:pointer;font-size:15px;line-height:1.35;min-height:28px}
.h4cb__in{position:absolute;opacity:0;width:22px;height:22px;margin:0;left:0;top:50%;transform:translateY(-50%);cursor:pointer}
.h4cb__box{flex:none;width:22px;height:22px;box-sizing:border-box;border:2px solid #0a0a0a;border-radius:4px;background:#fff;display:flex;align-items:center;justify-content:center;transition:background-color .2s ease,border-color .2s ease}
.h4cb__box svg{width:18px;height:18px;overflow:visible}
.h4cb__tick{fill:none;stroke:#fff;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:1;stroke-dashoffset:1;transition:stroke-dashoffset .3s cubic-bezier(.6,0,.4,1)}
.h4cb__row:hover .h4cb__box{border-color:#F5480F}
.h4cb__in:checked+.h4cb__box{background:#F5480F;border-color:#F5480F}
.h4cb__in:checked+.h4cb__box .h4cb__tick{stroke-dashoffset:0;transition-delay:.1s}
.h4cb__box.is-pop{animation:h4cb-pop .45s cubic-bezier(.3,.7,.3,1)}
@keyframes h4cb-pop{0%{transform:scale(1)}30%{transform:scale(.8,.86)}62%{transform:scale(1.12)}100%{transform:scale(1)}}
.h4cb__in:focus-visible+.h4cb__box{outline:2px solid #0a0a0a;outline-offset:3px}
@media (prefers-reduced-motion:reduce){.h4cb__box,.h4cb__tick{transition:none}.h4cb__box.is-pop{animation:none}}// Getekend vinkje · © 2026 NedDev BV · NedDev Lab-licentie (gratis gebruik, niet doorverkopen) · neddev.com/nl/lab/gebruik/#licentie
// root = het element waarin de HTML staat
function init(root){
var w=root.querySelector('.h4cb');if(!w)return;
w.addEventListener('change',function(e){
var b=e.target.nextElementSibling;if(!b||!b.classList.contains('h4cb__box'))return;
b.classList.remove('is-pop');void b.offsetWidth;b.classList.add('is-pop');
});
w.addEventListener('animationend',function(e){e.target.classList.remove('is-pop');});
}
init(document.querySelector('.jouw-container'));
More forms & inputs
Seen something you like?
Add it to your selection and send it over. We build your site around it, in your brand.
Get in touch →