Meteors
Light trails shoot diagonally across a dark panel behind the text. Works as a backdrop for a night service, a launch or a dark hero.
Ook om drie uur 's nachts
Storingsdienst Van Dijk Installatietechniek. Binnen een uur bij u in Utrecht en omgeving.
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.
<!-- Meteors · © 2026 NedDev BV · NedDev Lab-licentie (gratis gebruik, niet doorverkopen) · neddev.com/nl/lab/gebruik/#licentie -->
<div class="jouw-container">
<div class="mtr">
<div class="mtr__lucht" aria-hidden="true"></div>
<div class="mtr__tekst">
<h3 class="mtr__kop">Ook om drie uur 's nachts</h3>
<p class="mtr__sub">Storingsdienst Van Dijk Installatietechniek. Binnen een uur bij u in Utrecht en omgeving.</p>
</div>
</div>
</div>/* Meteors · © 2026 NedDev BV · NedDev Lab-licentie (gratis gebruik, niet doorverkopen) · neddev.com/nl/lab/gebruik/#licentie */
.mtr{position:relative;width:100%;height:100%;overflow:hidden;display:flex;align-items:flex-end;background:radial-gradient(120% 90% at 75% 0%,#1d1b1a 0%,#0a0a0a 62%);color:#fff;font-family:'Switzer',sans-serif;container-type:inline-size}
.mtr__lucht{position:absolute;inset:0;pointer-events:none}
.mtr__spoor{position:absolute;left:0;top:0;height:1px;width:var(--mtr-l,110px);transform-origin:100% 50%;background:linear-gradient(90deg,rgba(245,72,15,0) 0%,rgba(245,72,15,.5) 72%,#ffe2d6 100%);opacity:0;will-change:transform,opacity;animation:mtr-schiet var(--mtr-duur,2.6s) linear var(--mtr-wacht,0s) infinite}
.mtr__spoor::after{content:'';position:absolute;right:-2px;top:-1.5px;width:4px;height:4px;border-radius:50%;background:#fff}
@keyframes mtr-schiet{
0%{opacity:0;transform:translate(var(--mtr-x),var(--mtr-y)) rotate(34deg)}
10%{opacity:1}
75%{opacity:.9}
100%{opacity:0;transform:translate(calc(var(--mtr-x) + var(--mtr-dx)),calc(var(--mtr-y) + var(--mtr-dy))) rotate(34deg)}
}
.mtr__tekst{position:relative;padding:clamp(16px,5cqw,40px);max-width:560px}
.mtr__kop{margin:0;font-weight:600;font-size:clamp(20px,6.4cqw,44px);line-height:1.05;letter-spacing:-.01em}
.mtr__sub{margin:.6em 0 0;font-size:clamp(13px,2.6cqw,16px);line-height:1.45;color:rgba(255,255,255,.68);max-width:38ch}
@media (prefers-reduced-motion:reduce){
.mtr__spoor{animation:none;opacity:.55;transform:translate(calc(var(--mtr-x) + var(--mtr-dx) * .45),calc(var(--mtr-y) + var(--mtr-dy) * .45)) rotate(34deg)}
}// Meteors · © 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('.mtr'); if (!w) return;
var lucht = w.querySelector('.mtr__lucht');
var hoek = 34 * Math.PI / 180;
function bouw(){
var b = w.getBoundingClientRect(); if (!b.width) return;
lucht.textContent = '';
var aantal = Math.round(Math.min(22, Math.max(9, b.width / 55)));
var afstand = (b.height + 120) / Math.sin(hoek);
for (var i = 0; i < aantal; i++){
var s = document.createElement('span'); s.className = 'mtr__spoor';
var x = Math.random() * (b.width + b.height * 0.8) - b.height * 0.8;
var y = -40 - Math.random() * 80;
s.style.setProperty('--mtr-x', x.toFixed(0) + 'px');
s.style.setProperty('--mtr-y', y.toFixed(0) + 'px');
s.style.setProperty('--mtr-dx', (Math.cos(hoek) * afstand).toFixed(0) + 'px');
s.style.setProperty('--mtr-dy', (Math.sin(hoek) * afstand).toFixed(0) + 'px');
s.style.setProperty('--mtr-l', (70 + Math.random() * 90).toFixed(0) + 'px');
s.style.setProperty('--mtr-duur', (1.8 + Math.random() * 2.2).toFixed(2) + 's');
s.style.setProperty('--mtr-wacht', (Math.random() * 5).toFixed(2) + 's');
lucht.appendChild(s);
}
}
bouw();
var vorige = w.clientWidth;
if ('ResizeObserver' in window) new ResizeObserver(function(){ if (Math.abs(w.clientWidth - vorige) > 40){ vorige = w.clientWidth; bouw(); } }).observe(w);
}
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 →