INTERACTION_096CSS
Glass Reflection Card
A soft reflection sweeps across the glass surface on hover.
Cards / LightView
The image uncovers from behind the card copy on hover. Clipped to zero height from the bottom before the trigger; opening the clip while the image scales down from 1.08 to 1 once hover or focus-within.
/* Image Reveal Card — The image uncovers from behind the card copy on hover. */
.image-reveal-card {
--dur: 620ms;
--ease: cubic-bezier(0.22, 1, 0.36, 1);
--stagger: 60ms;
will-change: transform, opacity;
}
.image-reveal-card > * {
opacity: 0;
transform: translateY(14px);
animation: image-reveal-card-in var(--dur) var(--ease) forwards;
animation-delay: calc(var(--i, 0) * var(--stagger));
}
/* clipped to zero height from the bottom -> opening the clip while the image scales down from 1.08 to 1 */
@keyframes image-reveal-card-in {
to {
opacity: 1;
transform: none;
filter: none;
}
}
@media (prefers-reduced-motion: reduce) {
.image-reveal-card > * {
opacity: 1;
transform: none;
animation: none;
}
}import { useEffect, useRef } from "react";
/** Image Reveal Card — trigger: hover or focus-within */
export function ImageRevealCard({ 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="image-reveal-card" data-state="out">
{children}
</div>
);
}A soft reflection sweeps across the glass surface on hover.
A key card breathes gently above the grid to signal importance.
The recommended plan lifts, brightens and holds a moving border.