Regels die uitwaaieren
Large lines of text whose letters twist and shift apart near the edges of the view and fall back into a clean line right at the centre. For a short manifesto or a story page.
Hout dat
dertig jaar
meegaat,
gezaagd en
geschaafd
in Zaandam.
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.
<!-- Regels die uitwaaieren · © 2026 NedDev BV · NedDev Lab-licentie (gratis gebruik, niet doorverkopen) · neddev.com/nl/lab/gebruik/#licentie -->
<div class="jouw-container">
<div class="h6-stm"><div class="h6-stm__sc" tabindex="0" aria-label="Manifest, scroll om te lezen"><div class="h6-stm__pad"></div><p class="h6-stm__l">Hout dat</p><p class="h6-stm__l">dertig jaar</p><p class="h6-stm__l">meegaat,</p><p class="h6-stm__l">gezaagd en</p><p class="h6-stm__l">geschaafd</p><p class="h6-stm__l">in Zaandam.</p><div class="h6-stm__pad"></div></div><span class="h6-stm__hint" aria-hidden="true">Scroll in dit vak</span></div>
</div>/* Regels die uitwaaieren · © 2026 NedDev BV · NedDev Lab-licentie (gratis gebruik, niet doorverkopen) · neddev.com/nl/lab/gebruik/#licentie */
.h6-stm{position:absolute;inset:0;background:#0a0a0a;font-family:'Switzer',sans-serif;overflow:hidden}
.h6-stm__sc{position:absolute;inset:0;overflow-y:auto;overflow-x:hidden;scrollbar-width:none;outline:none;overscroll-behavior:contain}
.h6-stm__sc::-webkit-scrollbar{display:none}
.h6-stm__sc:focus-visible{box-shadow:inset 0 0 0 2px #F5480F}
.h6-stm__pad{height:46%}
.h6-stm__l{margin:0;padding:6px 20px;text-align:center;color:#fff;font-size:clamp(34px,6vw,52px);font-weight:700;line-height:1.08;letter-spacing:-.02em;white-space:nowrap}
.h6-stm__c{display:inline-block;will-change:transform}
.h6-stm__hint{position:absolute;right:16px;bottom:12px;font-size:12px;color:rgba(255,255,255,.5);pointer-events:none;transition:opacity .3s}
.h6-stm.is-moved .h6-stm__hint{opacity:0}// Regels die uitwaaieren · © 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('.h6-stm');if(!w)return;var sc=w.querySelector('.h6-stm__sc');
var reduce=matchMedia('(prefers-reduced-motion: reduce)').matches;
var lines=[].map.call(w.querySelectorAll('.h6-stm__l'),function(p){var t=p.textContent;p.setAttribute('aria-label',t);p.textContent='';var cs=[];
t.split('').forEach(function(ch){var s=document.createElement('span');s.className='h6-stm__c';s.setAttribute('aria-hidden','true');s.textContent=ch===' '?'\u00a0':ch;p.appendChild(s);cs.push(s);});
return {el:p,cs:cs};});
var raf=0;
function paint(){raf=0;var vr=sc.getBoundingClientRect(),mid=vr.top+vr.height/2,half=vr.height/2||1;
lines.forEach(function(L){var r=L.el.getBoundingClientRect(),c=((r.top+r.height/2)-mid)/half;c=Math.max(-1.3,Math.min(1.3,c));
var a=Math.abs(c),n=L.cs.length,h=(n-1)/2||1;L.el.style.opacity=String(1-Math.min(a,1)*.65);
if(reduce)return;
L.cs.forEach(function(s,j){var m=(j-h)/h;
var rot=m*c*34,ty=c*(m*m)*48+c*a*10,tx=m*a*22;
s.style.transform='translate3d('+tx.toFixed(2)+'px,'+ty.toFixed(2)+'px,0) rotate('+rot.toFixed(2)+'deg)';});});}
function req(){if(!raf)raf=requestAnimationFrame(paint);}
sc.addEventListener('scroll',function(){w.classList.add('is-moved');req();},{passive:true});
if('ResizeObserver' in window)new ResizeObserver(req).observe(sc);
sc.scrollTop=Math.round(sc.scrollHeight*.12);paint();
}
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 →