MAKE IT
FEEL PREMIUM.
INTERACTION_032CSS
Masked Line Reveal
Each line slides up from behind an invisible mask, one after the other.
Text / LightView
Copy resolves from a soft blur into perfect focus as it enters view. Blurred by 10px at 0 opacity and 12px below its final position before the trigger; easing blur to 0, opacity to 1 and translateY to 0 in a single pass once 20% of the element enters the viewport.
/* Blur To Focus Reveal — Copy resolves from a soft blur into perfect focus as it enters view. */
.blur-to-focus-reveal {
--dur: 700ms;
--ease: cubic-bezier(0.22, 1, 0.36, 1);
--stagger: 60ms;
will-change: transform, opacity;
}
.blur-to-focus-reveal > * {
opacity: 0;
transform: translateY(14px);
animation: blur-to-focus-reveal-in var(--dur) var(--ease) forwards;
animation-delay: calc(var(--i, 0) * var(--stagger));
}
/* blurred by 10px at 0 opacity and 12px below its final position -> easing blur to 0, opacity to 1 and translateY to 0 in a single pass */
@keyframes blur-to-focus-reveal-in {
to {
opacity: 1;
transform: none;
filter: none;
}
}
@media (prefers-reduced-motion: reduce) {
.blur-to-focus-reveal > * {
opacity: 1;
transform: none;
animation: none;
}
}import { useEffect, useRef } from "react";
/** Blur To Focus Reveal — trigger: 20% of the element enters the viewport */
export function BlurToFocusReveal({ 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="blur-to-focus-reveal" data-state="out">
{children}
</div>
);
}Each line slides up from behind an invisible mask, one after the other.
A wide soft light follows the pointer across a dark section.
Words fade up in sequence so the sentence assembles as you read it.
Sentences in a block arrive one at a time with a calm rhythm.