Cookiebanner als hoekkaart New
Corner cookie card with toggles per category. "Accept all" and "Necessary only" are styled equally, as the Dutch DPA requires. Choice can be changed later via the button bottom left.
Cookies op fietsvak.nl
Noodzakelijke cookies houden je mandje bij. Met jouw toestemming meten we het bezoek en tonen we advertenties op andere sites. Cookieverklaring
- NoodzakelijkMandje, inloggen, beveiliging
- StatistiekAnoniem bezoek meten
- MarketingAdvertenties op andere sites
How to use it
- Paste the HTML where the page sections 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.
<!-- Cookiebanner als hoekkaart · © 2026 NedDev BV · NedDev Lab-licentie (gratis gebruik, niet doorverkopen) · neddev.com/nl/lab/gebruik/#licentie -->
<div class="jouw-container">
<div class="cks">
<div class="cks__page" aria-hidden="true">
<div class="cks__nav"><b>Fietsvak</b><span>Stadsfietsen</span><span>E-bikes</span><span>Onderhoud</span><span class="cks__cart">Mandje (0)</span></div>
<div class="cks__band"><img src="https://neddev.com/lab-media/cookie-hoekkaart-1.webp" alt=""><img src="https://neddev.com/lab-media/cookie-hoekkaart-4.webp" alt=""><img src="https://neddev.com/lab-media/cookie-hoekkaart-3.webp" alt=""></div>
<div class="cks__hero"><p class="cks__t">Onderhoudsbeurt klaar terwijl je koffie drinkt</p><span class="cks__b">Plan een beurt voor € 69</span></div>
</div>
<div class="cks__card" role="dialog" aria-labelledby="cks-h" aria-describedby="cks-d">
<p class="cks__h" id="cks-h">Cookies op fietsvak.nl</p>
<p class="cks__d" id="cks-d">Noodzakelijke cookies houden je mandje bij. Met jouw toestemming meten we het bezoek en tonen we advertenties op andere sites. <a href="#">Cookieverklaring</a></p>
<ul class="cks__opts">
<li><span><b>Noodzakelijk</b><small>Mandje, inloggen, beveiliging</small></span><label class="cks__switch is-lock"><input type="checkbox" checked disabled><span class="cks__tr"></span><span class="cks__sr">Noodzakelijk, altijd aan</span></label></li>
<li><span><b>Statistiek</b><small>Anoniem bezoek meten</small></span><label class="cks__switch"><input type="checkbox" data-cat="statistiek"><span class="cks__tr"></span><span class="cks__sr">Statistiek</span></label></li>
<li><span><b>Marketing</b><small>Advertenties op andere sites</small></span><label class="cks__switch"><input type="checkbox" data-cat="marketing"><span class="cks__tr"></span><span class="cks__sr">Marketing</span></label></li>
</ul>
<div class="cks__btns">
<button type="button" class="cks__btn" data-act="all">Alles accepteren</button>
<button type="button" class="cks__btn" data-act="none">Alleen noodzakelijk</button>
</div>
<button type="button" class="cks__save" data-act="save">Voorkeuren opslaan</button>
</div>
<button type="button" class="cks__reopen" hidden>Cookie-instellingen</button>
<p class="cks__toast" role="status"></p>
</div>
</div>/* Cookiebanner als hoekkaart · © 2026 NedDev BV · NedDev Lab-licentie (gratis gebruik, niet doorverkopen) · neddev.com/nl/lab/gebruik/#licentie */
/* fonts (Fontshare): bespoke-serif@700 + bespoke-sans@400,500 */
.cks{position:relative;width:100%;align-self:flex-start;flex:none;height:540px;background:#22141F;color:#F6EEF3;font-family:'Bespoke Sans',sans-serif;font-weight:400;overflow:hidden;box-sizing:border-box}
.cks *{box-sizing:border-box}
.cks__page{position:absolute;inset:0;display:flex;flex-direction:column}
.cks__nav{display:flex;align-items:center;gap:24px;padding:16px 32px;font-size:15px;color:#BBA6B5;border-bottom:1px solid #43293D}
.cks__nav b{font-family:'Bespoke Serif',serif;font-weight:700;font-size:24px;color:#F6EEF3;margin-right:12px}
.cks__cart{margin-left:auto;color:#F6EEF3}
.cks__band{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr) minmax(0,1fr);grid-template-rows:220px;gap:6px;padding:6px 6px 0}
.cks__band img{display:block;width:100%;height:100%;object-fit:cover;min-height:0;border-radius:4px}
.cks__hero{flex:1;padding:28px 32px;display:flex;flex-direction:column;align-items:flex-end;text-align:right}
.cks__t{font-family:'Bespoke Serif',serif;font-weight:700;font-size:clamp(28px,3.6vw,46px);line-height:1.05;max-width:16ch;margin:0 0 18px}
.cks__b{background:#F2E35C;color:#000;padding:12px 18px;border-radius:4px;font-weight:500;font-size:15px}
.cks__card{position:absolute;left:20px;bottom:20px;width:370px;max-height:calc(100% - 40px);overflow:auto;background:#2E1C2A;border:1px solid #43293D;border-radius:4px;box-shadow:0 24px 48px -24px rgba(0,0,0,.8);padding:20px;z-index:3;transition:opacity .2s ease,transform .2s ease}
.cks.is-done .cks__card{opacity:0;transform:translateY(12px);visibility:hidden;transition:opacity .2s ease,transform .2s ease,visibility 0s linear .2s}
.cks__h{font-family:'Bespoke Serif',serif;font-weight:700;font-size:20px;margin:0 0 6px}
.cks__d{font-size:14px;line-height:1.5;color:#BBA6B5;margin:0 0 12px}
.cks__d a{color:#F6EEF3}
.cks__opts{list-style:none;margin:0 0 14px;padding:0}
.cks__opts li{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 0;border-top:1px solid #43293D}
.cks__opts b{display:block;font-weight:500;font-size:15px}
.cks__opts small{display:block;font-size:13px;color:#BBA6B5}
.cks__switch{position:relative;flex:none;cursor:pointer}
.cks__switch input{position:absolute;opacity:0;width:100%;height:100%;margin:0;cursor:inherit}
.cks__tr{display:block;width:44px;height:24px;border-radius:12px;background:#43293D;position:relative;transition:background .18s ease}
.cks__tr::after{content:'';position:absolute;top:3px;left:3px;width:18px;height:18px;border-radius:50%;background:#F6EEF3;transition:transform .18s ease}
.cks__switch input:checked+.cks__tr{background:#F2E35C}
.cks__switch input:checked+.cks__tr::after{transform:translateX(20px);background:#22141F}
.cks__switch input:focus-visible+.cks__tr{outline:2px solid #F6EEF3;outline-offset:2px}
.cks__switch.is-lock{cursor:not-allowed;opacity:.6}
.cks__sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.cks__btns{display:flex;gap:8px}
.cks__btn{flex:1;font:500 15px 'Bespoke Sans',sans-serif;color:#000;background:#F2E35C;border:1px solid #F2E35C;border-radius:4px;padding:12px 8px;cursor:pointer;transition:background .18s ease}
.cks__btn:hover,.cks__btn:focus-visible{background:#F6EEF3;border-color:#F6EEF3}
.cks__save{display:block;width:100%;margin-top:8px;font:500 14px 'Bespoke Sans',sans-serif;color:#F6EEF3;background:transparent;border:1px solid #43293D;border-radius:4px;padding:10px;cursor:pointer}
.cks__save:hover,.cks__save:focus-visible{border-color:#BBA6B5}
.cks__reopen{position:absolute;left:20px;bottom:20px;font:500 14px 'Bespoke Sans',sans-serif;color:#000;background:#F6EEF3;border:0;border-radius:4px;padding:10px 14px;cursor:pointer;z-index:2}
.cks__toast{position:absolute;right:20px;bottom:20px;margin:0;background:#F6EEF3;color:#22141F;font-size:14px;padding:10px 14px;border-radius:4px;opacity:0;transform:translateY(8px);transition:opacity .2s ease,transform .2s ease;pointer-events:none;max-width:calc(100% - 40px)}
.cks__toast.is-on{opacity:1;transform:none}
@media(max-width:640px){
.cks{height:600px}
.cks__nav span{display:none}.cks__nav .cks__cart{display:inline}.cks__nav{padding:12px 20px}
.cks__band{grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:150px}
.cks__band img:last-child{display:none}
.cks__hero{padding:20px;align-items:flex-start;text-align:left}
.cks__card{left:10px;right:10px;bottom:10px;width:auto;padding:16px}
.cks__toast{left:10px;right:10px;bottom:64px}
.cks__reopen{left:10px;bottom:10px}}
@media(prefers-reduced-motion:reduce){.cks__card,.cks__toast,.cks__tr,.cks__tr::after,.cks__btn{transition:none}}// Cookiebanner als hoekkaart · © 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('.cks');if(!w)return;
var card=w.querySelector('.cks__card'),re=w.querySelector('.cks__reopen'),toast=w.querySelector('.cks__toast'),tt=null;
var boxes=w.querySelectorAll('input[data-cat]');
function finish(){
var on=['noodzakelijk'];boxes.forEach(function(b){if(b.checked)on.push(b.getAttribute('data-cat'));});
w.classList.add('is-done');re.hidden=false;
toast.textContent='Opgeslagen: '+on.join(', ');toast.classList.add('is-on');clearTimeout(tt);tt=setTimeout(function(){toast.classList.remove('is-on');},2600);
re.focus({preventScroll:true});
// Hier zet je in productie de toestemming door (bv. gtag consent update), pas NA deze keuze scripts laden.
}
w.querySelectorAll('[data-act]').forEach(function(btn){btn.addEventListener('click',function(){
var a=btn.getAttribute('data-act');
if(a==='all')boxes.forEach(function(b){b.checked=true;});
if(a==='none')boxes.forEach(function(b){b.checked=false;});
finish();});});
re.addEventListener('click',function(){w.classList.remove('is-done');re.hidden=true;var f=card.querySelector('input:not([disabled])');if(f)f.focus({preventScroll:true});});
w.addEventListener('click',function(e){var a=e.target.closest('a[href="#"]');if(a)e.preventDefault();});
}
init(document.querySelector('.jouw-container'));
More page sections
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 →

