Tekst die scherp wordt
Lines of text are warped and faded at the edges of the box and straighten out once they reach the middle, through an SVG noise filter per line; for a short message read at the pace of the visitor.
Een site hoeft
niet te schreeuwen.
Hij moet snel laden,
zeggen wat je doet
en de telefoon
laten rinkelen.
How to use it
- Paste the HTML where the scroll effects 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.
<!-- Tekst die scherp wordt · © 2026 NedDev BV · NedDev Lab-licentie (gratis gebruik, niet doorverkopen) · neddev.com/nl/lab/gebruik/#licentie -->
<div class="jouw-container">
<div class="hrsf"><svg class="hrsf__defs" aria-hidden="true" focusable="false"></svg><div class="hrsf__sc" tabindex="0" aria-label="Tekst, scroll om verder te lezen"><div class="hrsf__in">
<p class="hrsf__r">Een site hoeft</p>
<p class="hrsf__r">niet te schreeuwen.</p>
<p class="hrsf__r">Hij moet snel laden,</p>
<p class="hrsf__r">zeggen wat je doet</p>
<p class="hrsf__r">en de telefoon</p>
<p class="hrsf__r">laten rinkelen.</p>
</div></div></div>
</div>/* Tekst die scherp wordt · © 2026 NedDev BV · NedDev Lab-licentie (gratis gebruik, niet doorverkopen) · neddev.com/nl/lab/gebruik/#licentie */
.hrsf{position:absolute;inset:0;background:#fff;font-family:'Switzer',sans-serif;container-type:size}
.hrsf__defs{position:absolute;width:0;height:0;overflow:hidden}
.hrsf__sc{position:absolute;inset:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#0a0a0a transparent}
.hrsf__sc:focus-visible{outline:2px solid #F5480F;outline-offset:-2px}
.hrsf__in{padding:calc(50cqh - .62em) 20px;text-align:center;font-size:clamp(24px,6.8cqw,60px)}
.hrsf__r{margin:0 0 .35em;font-weight:700;font-size:1em;line-height:1.2;letter-spacing:-.02em;color:#0a0a0a;will-change:filter,opacity}// Tekst die scherp wordt · © 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('.hrsf');if(!w)return;
var reduce=matchMedia('(prefers-reduced-motion: reduce)').matches;
var sc=w.querySelector('.hrsf__sc'),defs=w.querySelector('.hrsf__defs'),rs=[].slice.call(w.querySelectorAll('.hrsf__r'));
if(reduce)return;
var NS='http://www.w3.org/2000/svg',base='hrsf'+Math.random().toString(36).slice(2,7),maps=[],last=[];
rs.forEach(function(r,i){var f=document.createElementNS(NS,'filter');f.setAttribute('id',base+i);
['x','y','width','height'].forEach(function(k,j){f.setAttribute(k,['-15%','-40%','130%','180%'][j]);});
var t=document.createElementNS(NS,'feTurbulence');t.setAttribute('type','fractalNoise');t.setAttribute('baseFrequency','0.008 0.09');t.setAttribute('numOctaves','2');t.setAttribute('seed',String(3+i*7));t.setAttribute('result','ruis');
var d=document.createElementNS(NS,'feDisplacementMap');d.setAttribute('in','SourceGraphic');d.setAttribute('in2','ruis');d.setAttribute('scale','0');d.setAttribute('xChannelSelector','R');d.setAttribute('yChannelSelector','G');
f.appendChild(t);f.appendChild(d);defs.appendChild(f);maps.push(d);last.push(-1);r.style.filter='url(#'+base+i+')';});
var pend=false;
function upd(){pend=false;var sr=sc.getBoundingClientRect(),mid=sr.top+sr.height/2,half=sr.height/2||1;
rs.forEach(function(r,i){var b=r.getBoundingClientRect(),c=b.top+b.height/2;var e=Math.min(1,Math.abs(c-mid)/half);
var k=e<.12?0:Math.pow((e-.12)/.88,1.4);var s=Math.round(k*55);
if(s!==last[i]){last[i]=s;maps[i].setAttribute('scale',String(s));}
r.style.opacity=(1-k*.8).toFixed(3);});}
sc.addEventListener('scroll',function(){if(!pend){pend=true;requestAnimationFrame(upd);}},{passive:true});
if('ResizeObserver' in window)new ResizeObserver(upd).observe(sc);upd();
}
init(document.querySelector('.jouw-container'));
More scroll effects
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 →