Ledenpas met folieglans
A membership card that tilts with cursor or finger, with a warm foil sheen and a light spot moving over its surface; without interaction it slowly moves by itself. For subscriptions, gift cards and loyalty programmes.
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.
<!-- Ledenpas met folieglans · © 2026 NedDev BV · NedDev Lab-licentie (gratis gebruik, niet doorverkopen) · neddev.com/nl/lab/gebruik/#licentie -->
<div class="jouw-container">
<div class="hrhf"><div class="hrhf__pas" role="img" aria-label="Jaarabonnement Zwembad De Wetering op naam van Sanne Kuipers"><div class="hrhf__lijnen"></div><div class="hrhf__folie"></div><div class="hrhf__licht"></div><div class="hrhf__inh" aria-hidden="true"><p class="hrhf__club">Zwembad De Wetering</p><p class="hrhf__soort">Jaarabonnement 2027</p><div class="hrhf__voet"><p class="hrhf__naam">Sanne Kuipers</p><p class="hrhf__nr">40 2817 0093</p></div></div></div></div>
</div>/* Ledenpas met folieglans · © 2026 NedDev BV · NedDev Lab-licentie (gratis gebruik, niet doorverkopen) · neddev.com/nl/lab/gebruik/#licentie */
.hrhf{position:absolute;inset:0;display:grid;place-items:center;perspective:800px;font-family:'Switzer',sans-serif;container-type:size;touch-action:none}
.hrhf__pas{--rx:0deg;--ry:0deg;--mx:50%;--my:50%;--fx:50%;position:relative;width:min(320px,72cqw,calc(120cqh));aspect-ratio:1.586;border-radius:4px;overflow:hidden;background:#141414;color:#fff;transform:rotateX(var(--rx)) rotateY(var(--ry));transform-style:preserve-3d;box-shadow:0 18px 40px -18px rgba(10,10,10,.55)}
.hrhf__lijnen{position:absolute;inset:0;background:repeating-linear-gradient(118deg,rgba(255,255,255,.05) 0 1px,transparent 1px 5px)}
.hrhf__folie{position:absolute;inset:-1px;background:linear-gradient(115deg,#F5480F 0%,#f2b24a 18%,#8fd3c1 34%,#7fb3dc 48%,#f2b24a 64%,#F5480F 80%,#f2b24a 100%);background-size:260% 260%;background-position:var(--fx) var(--my);mix-blend-mode:color-dodge;opacity:.55;-webkit-mask-image:radial-gradient(circle at var(--mx) var(--my),#000 0%,rgba(0,0,0,.35) 45%,rgba(0,0,0,.1) 80%);mask-image:radial-gradient(circle at var(--mx) var(--my),#000 0%,rgba(0,0,0,.35) 45%,rgba(0,0,0,.1) 80%)}
.hrhf__licht{position:absolute;inset:0;background:radial-gradient(circle at var(--mx) var(--my),rgba(255,255,255,.38) 0%,rgba(255,255,255,0) 42%);mix-blend-mode:soft-light}
.hrhf__inh{position:absolute;inset:0;display:flex;flex-direction:column;padding:7% 7.5%;transform:translateZ(18px)}
.hrhf__club{margin:0;font-weight:700;font-size:clamp(15px,4.4cqw,22px);line-height:1.05;letter-spacing:-.01em}
.hrhf__soort{margin:.3em 0 0;font-size:clamp(12px,2.6cqw,14px);color:#f7b08f}
.hrhf__voet{margin-top:auto;display:flex;justify-content:space-between;align-items:flex-end;gap:10px}
.hrhf__naam{margin:0;font-weight:600;font-size:clamp(12px,2.8cqw,15px)}
.hrhf__nr{margin:0;font-size:clamp(12px,2.4cqw,14px);font-variant-numeric:tabular-nums;color:rgba(255,255,255,.75)}// Ledenpas met folieglans · © 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('.hrhf');if(!w)return;var pas=w.querySelector('.hrhf__pas');
var reduce=matchMedia('(prefers-reduced-motion: reduce)').matches;
var tx=.5,ty=.5,x=.5,y=.5,actief=false,laatste=0,vis=true,run=false,t0=performance.now();
function zet(){pas.style.setProperty('--rx',((.5-y)*16).toFixed(2)+'deg');pas.style.setProperty('--ry',((x-.5)*22).toFixed(2)+'deg');
pas.style.setProperty('--mx',(x*100).toFixed(1)+'%');pas.style.setProperty('--my',(y*100).toFixed(1)+'%');pas.style.setProperty('--fx',(x*100).toFixed(1)+'%');}
function richt(e){var r=pas.getBoundingClientRect();tx=Math.max(0,Math.min(1,(e.clientX-r.left)/r.width));ty=Math.max(0,Math.min(1,(e.clientY-r.top)/r.height));actief=true;laatste=performance.now();if(reduce){x=tx;y=ty;zet();}else wake();}
w.addEventListener('pointermove',richt);w.addEventListener('pointerdown',richt);
w.addEventListener('pointerleave',function(){actief=false;laatste=performance.now();if(reduce){x=y=.5;zet();}});
function loop(t){if(!vis||reduce){run=false;return;}
if(!actief&&t-laatste>1200){var s=(t-t0)/1000;tx=.5+.3*Math.sin(s*.6);ty=.5+.22*Math.sin(s*.43+1.3);}
x+=(tx-x)*.08;y+=(ty-y)*.08;zet();requestAnimationFrame(loop);}
function wake(){if(!run&&vis&&!reduce){run=true;requestAnimationFrame(loop);}}
if('IntersectionObserver' in window)new IntersectionObserver(function(es){vis=es[0].isIntersecting;if(vis)wake();}).observe(w);
zet();wake();
}
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 →