Route die meetekent
A winding line draws itself as you scroll through a route, with a dot on its tip and stops that light up once reached; for a route, timeline or delivery status.
Rit van vandaag · Utrecht centrum
07:30 Depot Lage Weide, 38 pakketten geladen
08:05 Oudegracht 112, bloemist De Linde
08:40 Biltstraat 41, drie dozen voor de apotheek
09:20 Science Park, receptie gebouw Noord
10:05 Terug op het depot, rit afgerond
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.
<!-- Route die meetekent · © 2026 NedDev BV · NedDev Lab-licentie (gratis gebruik, niet doorverkopen) · neddev.com/nl/lab/gebruik/#licentie -->
<div class="jouw-container">
<div class="hrpl"><div class="hrpl__sc" tabindex="0" aria-label="Bezorgrit, scroll om de route te volgen"><div class="hrpl__in"><svg class="hrpl__svg" aria-hidden="true"><path class="hrpl__spoor"></path><path class="hrpl__lijn"></path><circle class="hrpl__kop" r="6"></circle></svg>
<p class="hrpl__intro">Rit van vandaag · Utrecht centrum</p>
<div class="hrpl__halte"><span class="hrpl__dot"></span><p class="hrpl__t"><b>07:30</b> Depot Lage Weide, 38 pakketten geladen</p></div>
<div class="hrpl__halte"><span class="hrpl__dot"></span><p class="hrpl__t"><b>08:05</b> Oudegracht 112, bloemist De Linde</p></div>
<div class="hrpl__halte"><span class="hrpl__dot"></span><p class="hrpl__t"><b>08:40</b> Biltstraat 41, drie dozen voor de apotheek</p></div>
<div class="hrpl__halte"><span class="hrpl__dot"></span><p class="hrpl__t"><b>09:20</b> Science Park, receptie gebouw Noord</p></div>
<div class="hrpl__halte"><span class="hrpl__dot"></span><p class="hrpl__t"><b>10:05</b> Terug op het depot, rit afgerond</p></div>
</div></div></div>
</div>/* Route die meetekent · © 2026 NedDev BV · NedDev Lab-licentie (gratis gebruik, niet doorverkopen) · neddev.com/nl/lab/gebruik/#licentie */
.hrpl{position:absolute;inset:0;background:#0a0a0a;color:#fff;font-family:'Switzer',sans-serif;container-type:size}
.hrpl__sc{position:absolute;inset:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#F5480F transparent}
.hrpl__sc:focus-visible{outline:2px solid #F5480F;outline-offset:-2px}
.hrpl__in{position:relative;padding:22px 20px 60cqh 80px;max-width:640px;margin:0 auto}
.hrpl__svg{position:absolute;left:0;top:0;width:80px;height:100%;overflow:visible}
.hrpl__spoor{fill:none;stroke:rgba(255,255,255,.14);stroke-width:3;stroke-linecap:round}
.hrpl__lijn{fill:none;stroke:#F5480F;stroke-width:4;stroke-linecap:round}
.hrpl__kop{fill:#F5480F;stroke:#0a0a0a;stroke-width:3}
.hrpl__intro{margin:0 0 6cqh;font-size:13px;color:rgba(255,255,255,.6)}
.hrpl__halte{position:relative;min-height:22cqh;padding-bottom:4px}
.hrpl__dot{position:absolute;left:-49px;top:4px;width:12px;height:12px;border-radius:50%;background:#0a0a0a;border:2px solid rgba(255,255,255,.3);box-sizing:border-box;transition:background-color .25s,border-color .25s}
.hrpl__halte.is-aan .hrpl__dot{background:#F5480F;border-color:#F5480F}
.hrpl__t{margin:0;font-size:clamp(14px,2.6cqw,19px);line-height:1.35;color:rgba(255,255,255,.55);transition:color .25s}
.hrpl__t b{display:block;font-weight:600;color:inherit}
.hrpl__halte.is-aan .hrpl__t{color:#fff}
@media (prefers-reduced-motion:reduce){.hrpl__dot,.hrpl__t{transition:none}}// Route die meetekent · © 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('.hrpl');if(!w)return;
var sc=w.querySelector('.hrpl__sc'),inn=w.querySelector('.hrpl__in'),svg=w.querySelector('.hrpl__svg');
var spoor=w.querySelector('.hrpl__spoor'),lijn=w.querySelector('.hrpl__lijn'),kop=w.querySelector('.hrpl__kop');
var hs=[].slice.call(w.querySelectorAll('.hrpl__halte'));var L=0,tab=[],ys=[],pend=false;
function bouw(){var H=inn.offsetHeight;svg.setAttribute('viewBox','0 0 80 '+H);svg.setAttribute('height',H);
ys=hs.map(function(h){return h.offsetTop+10;});var xs=[37,52,24,50,37];
var d='M37 '+(ys[0]-24)+' L37 '+ys[0];
for(var i=1;i<ys.length;i++){var y0=ys[i-1],y1=ys[i],xa=xs[(i-1)%xs.length],xb=xs[i%xs.length],mid=(y0+y1)/2;
d+=' C'+xa+' '+(y0+(y1-y0)*.35)+' '+(xb+(xa>xb?-22:22))+' '+(mid)+' '+((xa+xb)/2)+' '+mid+' S'+xb+' '+(y1-(y1-y0)*.3)+' 37 '+y1;}
spoor.setAttribute('d',d);lijn.setAttribute('d',d);L=lijn.getTotalLength();tab=[];
for(var s=0;s<=240;s++){var l=L*s/240;tab.push([l,lijn.getPointAtLength(l).y]);}
lijn.style.strokeDasharray=L+' '+L;upd();}
function lenAt(y){if(!tab.length)return 0;if(y<=tab[0][1])return 0;
for(var i=1;i<tab.length;i++){if(tab[i][1]>=y){var a=tab[i-1],b=tab[i];var t=(y-a[1])/((b[1]-a[1])||1);return a[0]+(b[0]-a[0])*t;}}return L;}
function upd(){pend=false;var max=sc.scrollHeight-sc.clientHeight;var kopY=sc.scrollTop+sc.clientHeight*.55;
if(max>0&&sc.scrollTop>=max-2)kopY=ys[ys.length-1];
var l=lenAt(kopY);lijn.style.strokeDashoffset=(L-l);var p=lijn.getPointAtLength(Math.max(0,l));kop.setAttribute('cx',p.x);kop.setAttribute('cy',p.y);
hs.forEach(function(h,i){h.classList.toggle('is-aan',ys[i]<=p.y+1);});}
sc.addEventListener('scroll',function(){if(!pend){pend=true;requestAnimationFrame(upd);}},{passive:true});
if('ResizeObserver' in window)new ResizeObserver(bouw).observe(inn);bouw();
}
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 →