Woord dat overvloeit
The last word of the heading blurs and flows into the next word through an SVG threshold filter, so the letters seem to melt together. For a hero that names several services; screen readers hear the full list in one sentence, there is a pause button and with reduced motion the word stays still.
Wij bouwen uw nieuwe dakkapel, badkamer, keuken of aanbouw
Aannemersbedrijf Kok in Amersfoort. Vaste prijs vooraf en één aanspreekpunt van sloop tot oplevering.
How to use it
- Paste the HTML where the text animations 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.
<!-- Woord dat overvloeit · © 2026 NedDev BV · NedDev Lab-licentie (gratis gebruik, niet doorverkopen) · neddev.com/nl/lab/gebruik/#licentie -->
<div class="jouw-container">
<div class="wmf">
<h3 class="wmf__kop">
<span class="wmf__vast">Wij bouwen uw nieuwe</span>
<span class="wmf__wissel" aria-hidden="true"><span class="wmf__w wmf__w--uit">dakkapel</span><span class="wmf__w wmf__w--in"></span></span>
<span class="wmf__sr">dakkapel, badkamer, keuken of aanbouw</span>
</h3>
<div class="wmf__voet">
<p class="wmf__sub">Aannemersbedrijf Kok in Amersfoort. Vaste prijs vooraf en één aanspreekpunt van sloop tot oplevering.</p>
<button class="wmf__pauze" type="button">Pauzeer</button>
</div>
<svg class="wmf__defs" width="0" height="0" aria-hidden="true" focusable="false"><filter class="wmf__filter" x="-10%" y="-20%" width="120%" height="140%"><feColorMatrix in="SourceGraphic" type="matrix" values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 255 -120"/></filter></svg>
</div>
</div>/* Woord dat overvloeit · © 2026 NedDev BV · NedDev Lab-licentie (gratis gebruik, niet doorverkopen) · neddev.com/nl/lab/gebruik/#licentie */
.wmf{position:relative;width:100%;height:100%;box-sizing:border-box;display:flex;flex-direction:column;justify-content:center;gap:clamp(14px,3cqw,28px);padding:clamp(16px,4cqw,40px);background:#fff;color:#0a0a0a;font-family:'Switzer',sans-serif;container-type:inline-size}
.wmf__kop{margin:0;font-weight:700;line-height:1;letter-spacing:-.02em}
.wmf__vast{display:block;font-size:clamp(18px,4.2cqw,40px);font-weight:600;letter-spacing:-.01em}
.wmf__wissel{display:grid;margin-top:.12em;font-size:clamp(40px,13cqw,140px)}
.wmf__w{grid-area:1/1;white-space:nowrap}
.wmf__w--in{opacity:0}
.wmf--morph .wmf__wissel{filter:var(--wmf-filter)}
.wmf__sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.wmf__voet{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;border-top:1px solid #e0ddd8;padding-top:clamp(10px,2cqw,16px)}
.wmf__sub{margin:0;font-size:clamp(13px,1.8cqw,16px);line-height:1.45;color:#5a5651;max-width:46ch}
.wmf__pauze{flex:none;font:inherit;font-size:13px;font-weight:500;color:#0a0a0a;background:#fff;border:1px solid #0a0a0a;border-radius:4px;padding:7px 12px;cursor:pointer;transition:background .15s ease,color .15s ease}
.wmf__pauze:hover{background:#0a0a0a;color:#fff}
.wmf__pauze:focus-visible{outline:2px solid #F5480F;outline-offset:2px}
.wmf__defs{position:absolute;width:0;height:0;overflow:hidden}// Woord dat overvloeit · © 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('.wmf'); if (!w) return;
var uit = w.querySelector('.wmf__w--uit'), inn = w.querySelector('.wmf__w--in'), knop = w.querySelector('.wmf__pauze');
var filter = w.querySelector('.wmf__filter');
var id = 'wmf-' + Math.random().toString(36).slice(2, 9);
filter.setAttribute('id', id); w.style.setProperty('--wmf-filter', 'url(#' + id + ')');
var woorden = ['dakkapel', 'badkamer', 'keuken', 'aanbouw'];
var rustig = window.matchMedia && matchMedia('(prefers-reduced-motion: reduce)').matches;
if (rustig){ knop.hidden = true; return; }
var nu = 0, MORPH = 1100, RUST = 2000;
var fase = 'rust', faseStart = 0, gepauzeerd = false, zichtbaar = false, loopt = false, pauzeTijd = 0;
function vervaag(el, t){
var blur = Math.min(14, 9 * t * t + 0.0001), op = Math.pow(1 - t, 0.5);
el.style.filter = t > 0.001 ? 'blur(' + blur.toFixed(2) + 'px)' : '';
el.style.opacity = op.toFixed(3);
}
function teken(t){ vervaag(uit, t); vervaag(inn, 1 - t); }
function lus(tijd){
if (!zichtbaar || gepauzeerd){ loopt = false; pauzeTijd = tijd; return; }
if (!faseStart) faseStart = tijd;
var verstreken = tijd - faseStart;
if (fase === 'rust' && verstreken > RUST){
fase = 'morph'; faseStart = tijd; verstreken = 0;
inn.textContent = woorden[(nu + 1) % woorden.length];
w.classList.add('wmf--morph');
}
if (fase === 'morph'){
var t = Math.min(1, verstreken / MORPH);
teken(t);
if (t >= 1){
nu = (nu + 1) % woorden.length;
uit.textContent = woorden[nu]; teken(0); inn.textContent = '';
w.classList.remove('wmf--morph');
fase = 'rust'; faseStart = tijd;
}
}
requestAnimationFrame(lus);
}
function aan(){ if (!loopt && zichtbaar && !gepauzeerd){ loopt = true; requestAnimationFrame(function(t){ if (faseStart && pauzeTijd) faseStart += t - pauzeTijd; pauzeTijd = 0; lus(t); }); } }
knop.addEventListener('click', function(){
gepauzeerd = !gepauzeerd;
knop.textContent = gepauzeerd ? 'Speel af' : 'Pauzeer';
if (!gepauzeerd) aan();
});
if ('IntersectionObserver' in window) new IntersectionObserver(function(e){ zichtbaar = e[0].isIntersecting; if (zichtbaar) aan(); }).observe(w);
else { zichtbaar = true; aan(); }
}
init(document.querySelector('.jouw-container'));
More text animations
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 →