Hero met boekbalk als onderrand Nieuw
Hero voor een evenementenlocatie of hotel: kop naast een staande foto, met een boekbalk als onderrand (datumbereik, aantal gasten, soort evenement). Toont laden, fout (einddatum vóór begindatum), leeg (te veel gasten) en resultaat met vrije zalen als lijst. Native date-inputs; in productie koppel je de zoekactie aan je reserveringssysteem.
Een zaal aan de Zaan
Voor uw jubileum, congres of personeelsfeest. Remise Oost in Zaandam is een tramremise uit 1911, 12 minuten van Amsterdam Centraal, met drie zalen tot 650 gasten, een eigen keuken en gratis parkeren voor 140 auto's.
Zo gebruik je het
- Plak de HTML op de plek waar het onderdeel moet komen.
- Zet de CSS in je stylesheet. Alle klassen hebben een eigen voorvoegsel, dus niets botst met je eigen opmaak.
- Voeg de JavaScript toe en roep init() aan met het element waar de HTML in staat.
<!-- Hero met boekbalk als onderrand · © 2026 NedDev BV · NedDev Lab-licentie (gratis gebruik, niet doorverkopen) · neddev.com/nl/lab/gebruik/#licentie -->
<div class="jouw-container">
<div class="bbh">
<div class="bbh__hero">
<div class="bbh__copy">
<h2 class="bbh__h">Een zaal aan de Zaan</h2>
<p class="bbh__lead">Voor uw jubileum, congres of personeelsfeest. Remise Oost in Zaandam is een tramremise uit 1911, 12 minuten van Amsterdam Centraal, met drie zalen tot 650 gasten, een eigen keuken en gratis parkeren voor 140 auto's.</p>
</div>
<img class="bbh__img" src="https://neddev.com/lab-media/boekbalk-hero-rand-1.webp" alt="Ketelhuis van Remise Oost, gedekt voor een diner met lange tafels" loading="lazy">
</div>
<form class="bbh__bar" novalidate aria-label="Beschikbaarheid zoeken">
<div class="bbh__f"><label for="bbh-van">Van</label><input id="bbh-van" class="bbh__in" type="date" value="2026-11-13" min="2026-10-07" required></div>
<div class="bbh__f"><label for="bbh-tot">Tot en met</label><input id="bbh-tot" class="bbh__in" type="date" value="2026-11-13" min="2026-10-07" required aria-describedby="bbh-err"></div>
<div class="bbh__f"><label for="bbh-n">Gasten</label>
<div class="bbh__step"><button type="button" class="bbh__sb" data-d="-10" aria-label="10 gasten minder">-</button><input id="bbh-n" class="bbh__in bbh__num" type="number" inputmode="numeric" min="10" max="2000" step="10" value="120"><button type="button" class="bbh__sb" data-d="10" aria-label="10 gasten meer">+</button></div>
</div>
<div class="bbh__f"><label for="bbh-soort">Soort</label>
<select id="bbh-soort" class="bbh__in"><option>Diner</option><option>Congres</option><option>Feest</option><option>Vergadering</option></select>
</div>
<button type="submit" class="bbh__go"><span class="bbh__spin" aria-hidden="true"></span><span class="bbh__go-lbl">Bekijk vrije zalen</span></button>
<p class="bbh__err" id="bbh-err" role="alert"></p>
</form>
<div class="bbh__out" aria-live="polite">
<p class="bbh__range"></p>
<div class="bbh__res"></div>
</div>
</div>
</div>/* Hero met boekbalk als onderrand · © 2026 NedDev BV · NedDev Lab-licentie (gratis gebruik, niet doorverkopen) · neddev.com/nl/lab/gebruik/#licentie */
/* fonts (Fontshare): gambetta@600 + switzer@400,500 */
.bbh{--bg:#E9EEEA;--opp:#F6F8F6;--tekst:#121A15;--gedempt:#495650;--lijn:#CFD8D1;--accent:#2D4BD8;--op-accent:#FFFFFF;
background:var(--bg);color:var(--tekst);font-family:'Switzer',sans-serif;font-weight:400;font-size:16px;line-height:1.55}
.bbh__hero{max-width:1660px;margin:0 auto;display:grid;grid-template-columns:minmax(0,6fr) minmax(0,5fr);align-items:stretch}
.bbh__copy{padding:clamp(40px,6vw,96px) clamp(20px,4vw,64px);display:flex;flex-direction:column;justify-content:flex-end}
.bbh__h{font-family:'Gambetta',serif;font-weight:600;font-size:clamp(44px,6.4vw,88px);line-height:.98;letter-spacing:-.02em;margin:0 0 24px}
.bbh__lead{font-size:20px;line-height:1.5;color:var(--gedempt);margin:0;max-width:30em}
.bbh__img{width:100%;height:100%;min-height:420px;max-height:620px;object-fit:cover;display:block}
.bbh__bar{max-width:1660px;margin:0 auto;display:flex;flex-wrap:wrap;align-items:flex-end;gap:16px 20px;padding:20px clamp(20px,4vw,64px);background:var(--tekst);color:var(--opp)}
.bbh__f{display:flex;flex-direction:column;gap:6px;flex:1 1 150px;min-width:0}
.bbh__f label{font-size:14px;color:#c9d3cc}
.bbh__in{min-height:48px;padding:0 12px;border:1px solid #3a463f;background:#1d2721;color:#fff;font:400 16px 'Switzer',sans-serif;width:100%;box-sizing:border-box;color-scheme:dark}
.bbh__in:focus{outline:2px solid #8fa4ff;outline-offset:1px}
.bbh__in[aria-invalid="true"]{border-color:#ff8a7a}
.bbh__step{display:flex}
.bbh__num{text-align:center;border-left:0;border-right:0;-moz-appearance:textfield}
.bbh__num::-webkit-inner-spin-button{appearance:none}
.bbh__sb{flex:none;width:48px;min-height:48px;border:1px solid #3a463f;background:#1d2721;color:#fff;font-size:20px;cursor:pointer}
.bbh__sb:hover{background:#2a362f}
.bbh__go{flex:1 1 200px;display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:48px;padding:0 22px;border:0;background:var(--accent);color:var(--op-accent);font:500 16px 'Switzer',sans-serif;cursor:pointer;transition:background-color .18s}
.bbh__go:hover{background:#4562ea}
.bbh__go:focus-visible,.bbh__sb:focus-visible,.bbh__opt:focus-visible{outline:2px solid #8fa4ff;outline-offset:2px}
.bbh__spin{display:none;width:16px;height:16px;border:2px solid rgba(255,255,255,.4);border-top-color:#fff;border-radius:50%;animation:bbh-spin .8s linear infinite}
.bbh__go[aria-busy="true"] .bbh__spin{display:inline-block}
@keyframes bbh-spin{to{transform:rotate(360deg)}}
.bbh__err{flex-basis:100%;margin:0;color:#ffb3a8;font-size:15px}
.bbh__err:empty{display:none}
.bbh__out{max-width:1660px;margin:0 auto;padding:20px clamp(20px,4vw,64px) clamp(40px,5vw,64px)}
.bbh__range{margin:0 0 12px;color:var(--gedempt)}
.bbh__res{border-top:1px solid var(--lijn)}
.bbh__res:empty{border:0}
.bbh__room{display:grid;grid-template-columns:minmax(120px,1fr) minmax(0,2fr) auto auto;gap:8px 24px;align-items:center;padding:16px 0;border-bottom:1px solid var(--lijn)}
.bbh__room b{font-family:'Gambetta',serif;font-weight:600;font-size:24px}
.bbh__room span{color:var(--gedempt)}
.bbh__room strong{font-weight:500}
.bbh__room--off{opacity:.6}
.bbh__opt{min-height:44px;padding:0 18px;border:1px solid var(--accent);background:transparent;color:var(--accent);font:500 15px 'Switzer',sans-serif;cursor:pointer}
.bbh__opt[aria-pressed="true"]{background:var(--accent);color:var(--op-accent)}
.bbh__msg{margin:16px 0 0;max-width:44em}
@media (max-width:860px){.bbh__hero{grid-template-columns:1fr}.bbh__img{min-height:260px;max-height:340px}.bbh__room{grid-template-columns:1fr}}
@media (max-width:480px){.bbh__copy{padding:36px 20px}.bbh__lead{font-size:17px}.bbh__bar{padding:20px}.bbh__out{padding:20px 20px 40px}}
@media (prefers-reduced-motion:reduce){.bbh__spin{animation:none}.bbh__go{transition:none}}// Hero met boekbalk als onderrand · © 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){
const w=root.querySelector('.bbh'); if(!w) return;
const f=w.querySelector('.bbh__bar'), van=w.querySelector('#bbh-van'), tot=w.querySelector('#bbh-tot'), n=w.querySelector('#bbh-n'), soort=w.querySelector('#bbh-soort'), go=w.querySelector('.bbh__go'), lbl=w.querySelector('.bbh__go-lbl'), err=w.querySelector('.bbh__err'), rng=w.querySelector('.bbh__range'), res=w.querySelector('.bbh__res');
const Z=[{n:'Ketelhuis',max:650,p:4950,s:'Hoge kap, eigen bar, podium 8 bij 6 meter'},{n:'Wagenhal',max:280,p:2450,s:'Daglicht, aan het water, eigen terras'},{n:'Seinhuis',max:60,p:875,s:'Vergaderzaal met scherm en geluid'}];
const BUSY={'2026-11-14':['Ketelhuis'],'2026-11-21':['Ketelhuis','Wagenhal'],'2026-12-12':['Ketelhuis','Wagenhal'],'2026-12-19':['Ketelhuis','Wagenhal','Seinhuis']};
const d=s=>new Date(s+'T12:00');
const fmt=x=>x.toLocaleDateString('nl-NL',{weekday:'short',day:'numeric',month:'short'});
const eur=v=>'€ '+v.toLocaleString('nl-NL',{minimumFractionDigits:2,maximumFractionDigits:2});
const days=()=>Math.round((d(tot.value)-d(van.value))/864e5)+1;
const showRange=()=>{if(!van.value||!tot.value||d(tot.value)<d(van.value)){rng.textContent='';return;} const k=days(); rng.textContent=(k===1?fmt(d(van.value)):fmt(d(van.value))+' t/m '+fmt(d(tot.value)))+', '+k+(k===1?' dag':' dagen')+', '+n.value+' gasten';};
const clamp=()=>{let v=parseInt(n.value,10); if(isNaN(v)) v=10; n.value=Math.max(10,Math.min(2000,v));};
w.querySelectorAll('.bbh__sb').forEach(b=>b.addEventListener('click',()=>{n.value=(parseInt(n.value,10)||0)+parseInt(b.dataset.d,10); clamp(); showRange();}));
van.addEventListener('change',()=>{if(van.value&&(!tot.value||d(tot.value)<d(van.value))) tot.value=van.value; tot.min=van.value||tot.min; showRange();});
[tot,n].forEach(x=>x.addEventListener('change',()=>{clamp(); showRange();}));
const setErr=(m,el)=>{err.textContent=m; [van,tot].forEach(x=>x.removeAttribute('aria-invalid')); if(el){el.setAttribute('aria-invalid','true'); el.focus();}};
f.addEventListener('submit',e=>{e.preventDefault(); if(go.getAttribute('aria-busy')==='true') return;
if(!van.value||!tot.value){setErr('Kies een begin- en einddatum.',!van.value?van:tot); return;}
if(d(tot.value)<d(van.value)){setErr('De einddatum ligt vóór de begindatum. Kies een datum vanaf '+fmt(d(van.value))+'.',tot); return;}
setErr(''); clamp(); showRange();
go.setAttribute('aria-busy','true'); lbl.textContent='Zoeken...'; res.innerHTML='';
setTimeout(()=>{go.removeAttribute('aria-busy'); lbl.textContent='Bekijk vrije zalen';
const g=+n.value, k=days(), dates=[]; for(let i=0;i<k;i++){const x=d(van.value); x.setDate(x.getDate()+i); dates.push(x.toISOString().slice(0,10));}
const busy=new Set(dates.flatMap(x=>BUSY[x]||[]));
const fit=Z.filter(z=>z.max>=g);
if(!fit.length){res.innerHTML='<p class="bbh__msg"><b>Geen zaal voor '+g+' gasten.</b> Onze grootste zaal, het Ketelhuis, past tot 650 gasten. Voor grotere evenementen gebruiken we ook het buitenterrein: bel Sanne de Wit op 075 123 45 67.</p>'; return;}
res.innerHTML=fit.map(z=>busy.has(z.n)?'<div class="bbh__room bbh__room--off"><b>'+z.n+'</b><span>Al geboekt op deze datum, tot '+z.max+' gasten</span></div>':'<div class="bbh__room"><b>'+z.n+'</b><span>'+z.s+', tot '+z.max+' gasten</span><strong>vanaf '+eur(z.p*k)+'</strong><button type="button" class="bbh__opt" aria-pressed="false">Optie nemen</button></div>').join('');
if(fit.every(z=>busy.has(z.n))) res.insertAdjacentHTML('beforeend','<p class="bbh__msg">Alle passende zalen zijn bezet. Probeer de vrijdag ervoor of zet u op de wachtlijst.</p>');
},850);
});
res.addEventListener('click',e=>{const b=e.target.closest('.bbh__opt'); if(!b) return; const on=b.getAttribute('aria-pressed')!=='true'; b.setAttribute('aria-pressed',on?'true':'false'); b.textContent=on?'Optie genomen, 7 dagen geldig':'Optie nemen';});
showRange();
}
init(document.querySelector('.jouw-container'));
Meer uit paginasecties
Iets gezien dat je mooi vindt?
Zet het in je selectie en stuur hem op. Dan bouwen we je site eromheen, in jouw huisstijl.
Neem contact op →