Next route/WORK
INTERACTION_159CSS + JS
Curtain Transition
Panels close over the page then lift to reveal the next route.
Transitions / LightView
The mark draws itself once, then the page takes over. Stroke dash offset at full length before the trigger; drawing the stroke, filling the mark, then lifting the overlay once first page load only.
/* Loading Logo Reveal — The mark draws itself once, then the page takes over. */
.loading-logo-reveal {
--dur: 1.1s;
--ease: cubic-bezier(0.22, 1, 0.36, 1);
--stagger: 60ms;
will-change: transform, opacity;
}
.loading-logo-reveal > * {
opacity: 0;
transform: translateY(14px);
animation: loading-logo-reveal-in var(--dur) var(--ease) forwards;
animation-delay: calc(var(--i, 0) * var(--stagger));
}
/* stroke dash offset at full length -> drawing the stroke, filling the mark, then lifting the overlay */
@keyframes loading-logo-reveal-in {
to {
opacity: 1;
transform: none;
filter: none;
}
}
@media (prefers-reduced-motion: reduce) {
.loading-logo-reveal > * {
opacity: 1;
transform: none;
animation: none;
}
}import { useEffect, useRef } from "react";
/** Loading Logo Reveal — trigger: first page load only */
export function LoadingLogoReveal({ children }: { children: React.ReactNode }) {
const ref = useRef<HTMLDivElement>(null);
useEffect(() => {
const el = ref.current;
if (!el) return;
if (window.matchMedia("(prefers-reduced-motion: reduce)").matches) {
el.dataset["state"] = "in";
return;
}
const io = new IntersectionObserver(
([entry]) => {
if (entry?.isIntersecting) {
el.dataset["state"] = "in";
io.unobserve(el);
}
},
{ threshold: 0.2 },
);
io.observe(el);
return () => io.disconnect();
}, []);
return (
<div ref={ref} className="loading-logo-reveal" data-state="out">
{children}
</div>
);
}Panels close over the page then lift to reveal the next route.
A circle grows from the click point to cover the page.
The outgoing page blurs out and the next resolves into focus.
Routes slide horizontally in the direction of travel.