Venetian Blind Slat Transition.
Segmenting the viewport into 12 staggered architectural slats that rotate along horizontal axes to expose the next view.
View code
<div class="pages"><section class="page first"><small>WEB TATTVA / 01</small><strong>IDEA.</strong></section><section class="page second"><small>WEB TATTVA / 02</small><strong>IMPACT.</strong></section><button>Next scene ↗</button></div>:root { color-scheme: dark; font: 15px system-ui, sans-serif; color: #dbff55; }
* { box-sizing: border-box; }
body { margin: 0; height: 100dvh; display: grid; place-items: center; overflow: hidden; background: transparent; }
.tile { display: grid; place-items: center; width: 68px; aspect-ratio: 1; border-radius: 18px; background: currentColor; }
.tile { background: #dbff55; color: #202415; font-size: 30px; }
canvas { display: block; width: 100%; height: 100%; min-width: 0; min-height: 0; }
button { font: inherit; color: #f3f1e9; background: #191919; border: 1px solid #ffffff66; padding: 8px 14px; border-radius: 24px; cursor: pointer; }
:focus-visible { outline: 2px solid #dbff55; outline-offset: -3px; }
.notice { max-width: 34ch; padding: 16px; color: #fff; }
@media (prefers-reduced-motion: reduce) { .sprite { animation-play-state: paused; } }
.pages{position:relative;width:100%;height:100%;overflow:hidden}.page{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:center;padding:8%;background:#222a18;color:#dbff55}.page strong{font:900 clamp(32px,12vw,90px)/1 Arial;letter-spacing:-.08em}.page small{margin-bottom:12px;font:10px monospace}.second{background:#dbff55;color:#151912;clip-path:inset(50% 0 50% 0);transition:clip-path .85s cubic-bezier(.76,0,.24,1),transform .85s,opacity .85s}.changed .second{clip-path:inset(0 0 0 0)}button{position:absolute;z-index:2;bottom:12px;right:12px}@media(prefers-reduced-motion:reduce){.second{transition:none}}.second{mask:repeating-linear-gradient(0deg,#000 0 18px,transparent 18px 20px)}const pages=document.querySelector('.pages');
document.querySelector('button').onclick=()=>pages.classList.toggle('changed');
if(new URLSearchParams(location.search).has('preview')){
let active=false;
addEventListener('message',event=>{
if(event.source===parent && event.origin===location.origin && event.data?.type==='motion-play')active=event.data.active;
});
setInterval(()=>{if(active)pages.classList.toggle('changed')},2400);
}