Fotoreportages in 3D-rij
Reportages as a row of panels in 3D: the middle one faces you, the others turn away at an angle and recede. Browse with the buttons, by clicking a panel, dragging or the arrow keys; the caption tells you where you are. For photographers, record labels and portfolios. CSS 3D with transforms from our own JS, no library.
How to use it
- Paste the HTML where the components 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.
<!-- Fotoreportages in 3D-rij · © 2026 NedDev BV · NedDev Lab-licentie (gratis gebruik, niet doorverkopen) · neddev.com/nl/lab/gebruik/#licentie -->
<div class="jouw-container">
<div class="cvf" role="region" aria-roledescription="carrousel" aria-label="Fotoreportages">
<div class="cvf__vlak" tabindex="0" aria-label="Gebruik de pijltjestoetsen om te bladeren">
<ul class="cvf__rij">
<li class="cvf__it"><img src="https://neddev.com/lab-media/site-fotograaf-1.webp" alt="Bruidspaar langs de Oudegracht" draggable="false"></li>
<li class="cvf__it"><img src="https://neddev.com/lab-media/site-fotograaf-2.webp" alt="Ringen wisselen in een kerk" draggable="false"></li>
<li class="cvf__it"><img src="https://neddev.com/lab-media/site-fotograaf-3.webp" alt="Gasten gooien confetti bij een boerderij" draggable="false"></li>
<li class="cvf__it"><img src="https://neddev.com/lab-media/site-fotograaf-4.webp" alt="Portret van een vrouw bij het raam" draggable="false"></li>
<li class="cvf__it"><img src="https://neddev.com/lab-media/site-fotograaf-6.webp" alt="Gezin wandelt door de duinen" draggable="false"></li>
<li class="cvf__it"><img src="https://neddev.com/lab-media/site-fotograaf-7.webp" alt="Team aan een lange tafel op kantoor" draggable="false"></li>
<li class="cvf__it"><img src="https://neddev.com/lab-media/site-fotograaf-8.webp" alt="Bruid wordt in haar jurk geholpen" draggable="false"></li>
</ul>
</div>
<div class="cvf__bal">
<button class="cvf__pijl" type="button" data-d="-1" aria-label="Vorige reportage"><svg viewBox="0 0 24 24" width="16" height="16" aria-hidden="true"><path d="M15 5l-7 7 7 7" fill="none" stroke="currentColor" stroke-width="2"/></svg></button>
<p class="cvf__cap" aria-live="polite"></p>
<button class="cvf__pijl" type="button" data-d="1" aria-label="Volgende reportage"><svg viewBox="0 0 24 24" width="16" height="16" aria-hidden="true"><path d="M9 5l7 7-7 7" fill="none" stroke="currentColor" stroke-width="2"/></svg></button>
</div>
</div>
</div>/* Fotoreportages in 3D-rij · © 2026 NedDev BV · NedDev Lab-licentie (gratis gebruik, niet doorverkopen) · neddev.com/nl/lab/gebruik/#licentie */
.cvf{position:absolute;inset:0;display:flex;flex-direction:column;background:#f4f3f1;font-family:'Switzer',system-ui,sans-serif;color:#0a0a0a;overflow:hidden}
.cvf__vlak{position:relative;flex:1;min-height:0;perspective:1000px;touch-action:pan-y;cursor:grab;outline:none}
.cvf__vlak:focus-visible{box-shadow:inset 0 0 0 2px #F5480F}
.cvf.is-sleep .cvf__vlak{cursor:grabbing}
.cvf__rij{list-style:none;margin:0;padding:0;position:absolute;inset:0;transform-style:preserve-3d;pointer-events:none}
.cvf__it{position:absolute;left:50%;top:50%;width:var(--cvf-w,150px);aspect-ratio:1;margin:calc(var(--cvf-w,150px) / -2) 0 0 calc(var(--cvf-w,150px) / -2);border-radius:4px;overflow:hidden;background:#d6d2ca;box-shadow:0 14px 30px -14px rgba(10,10,10,.6);transition:transform .55s cubic-bezier(.2,.8,.2,1),opacity .4s,filter .4s;cursor:pointer;backface-visibility:hidden;pointer-events:auto}
.cvf.is-sleep .cvf__it{transition:none}
.cvf__it img{width:100%;height:100%;object-fit:cover;display:block;pointer-events:none}
.cvf__it.is-zij{filter:brightness(.82)}
.cvf__bal{display:flex;align-items:center;justify-content:center;gap:10px;padding:0 10px 10px}
.cvf__cap{margin:0;min-width:0;flex:0 1 auto;font-size:13px;font-weight:600;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cvf__cap span{font-weight:400;color:#6b6862}
.cvf__pijl{flex:none;width:32px;height:32px;display:grid;place-items:center;border:1px solid #0a0a0a;border-radius:4px;background:#fff;color:#0a0a0a;cursor:pointer}
.cvf__pijl:hover{background:#0a0a0a;color:#fff}.cvf__pijl:focus-visible{outline:2px solid #F5480F;outline-offset:2px}
.cvf__pijl:disabled{opacity:.35;cursor:default;background:#fff;color:#0a0a0a}
@media (prefers-reduced-motion:reduce){.cvf__it{transition:none}}// Fotoreportages in 3D-rij · © 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 box = root.querySelector('.cvf'); if (!box) return;
const vlak = box.querySelector('.cvf__vlak'), its = [...box.querySelectorAll('.cvf__it')], cap = box.querySelector('.cvf__cap');
const [vorige, volgende] = box.querySelectorAll('.cvf__pijl');
const TXT = [['Bruiloft aan de Oudegracht', 'Utrecht'], ['Ceremonie in de kerk', 'Leiden'], ['Confetti op het erf', 'Bunnik'], ['Portret bij daglicht', 'Haarlem'], ['Gezin in de duinen', 'Schoorl'], ['Teamfoto op kantoor', 'Rotterdam'], ['Laatste knoopjes', 'Delft']];
let pos = 3, w = 150, sleep = null;
const N = its.length;
const leg = () => {
its.forEach((it, i) => {
const d = i - pos, a = Math.abs(d), s = Math.sign(d), dicht = Math.min(a, 1), ver = Math.max(a - 1, 0);
const x = s * (dicht * w * 0.7 + ver * w * 0.3), z = -dicht * w * 0.6 - ver * w * 0.25, ry = -s * dicht * 52;
it.style.transform = `translate3d(${x.toFixed(1)}px,0,${z.toFixed(1)}px) rotateY(${ry.toFixed(1)}deg)`;
it.style.zIndex = String(100 - Math.round(a * 10));
it.style.opacity = a > 3.4 ? '0' : '1';
it.classList.toggle('is-zij', a > 0.5);
it.setAttribute('aria-hidden', a > 0.5 ? 'true' : 'false');
});
};
const kies = i => {
pos = Math.max(0, Math.min(N - 1, Math.round(i))); leg();
cap.innerHTML = `${TXT[pos][0]} <span>· ${TXT[pos][1]} · ${pos + 1} van ${N}</span>`;
vorige.disabled = pos === 0; volgende.disabled = pos === N - 1;
};
const maat = () => { const r = vlak.getBoundingClientRect(); w = Math.round(Math.min(r.height * 0.82, r.width * 0.42)); box.style.setProperty('--cvf-w', w + 'px'); leg(); };
vorige.addEventListener('click', () => kies(pos - 1)); volgende.addEventListener('click', () => kies(pos + 1));
vlak.addEventListener('keydown', e => {
const m = { ArrowLeft: pos - 1, ArrowRight: pos + 1, Home: 0, End: N - 1 }[e.key];
if (m !== undefined) { e.preventDefault(); kies(m); }
});
vlak.addEventListener('pointerdown', e => { sleep = { x: e.clientX, p: pos, bewogen: false, id: e.pointerId, doel: e.target.closest('.cvf__it') }; });
vlak.addEventListener('pointermove', e => {
if (!sleep) return; const dx = e.clientX - sleep.x;
if (!sleep.bewogen && Math.abs(dx) > 6) { sleep.bewogen = true; vlak.setPointerCapture(sleep.id); box.classList.add('is-sleep'); }
if (sleep.bewogen) { pos = Math.max(-0.4, Math.min(N - 0.6, sleep.p - dx / (w * 0.7))); leg(); }
});
const los = () => {
if (!sleep) return; const s = sleep; sleep = null; box.classList.remove('is-sleep');
if (s.bewogen) kies(pos); else if (s.doel) kies(its.indexOf(s.doel));
};
vlak.addEventListener('pointerup', los); vlak.addEventListener('pointercancel', los);
if ('ResizeObserver' in window) new ResizeObserver(maat).observe(vlak); else addEventListener('resize', maat);
maat(); kies(pos);
}
init(document.querySelector('.jouw-container'));
More components
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 →





