Back to library
INTERACTION_096

Glass Reflection Card.

A soft reflection sweeps across the glass surface on hover. Parked off the left edge at low opacity before the trigger; sweeping the reflection diagonally across the card once once hover.

CATEGORY
Cards
COMPLEXITY
Easy
TECH
CSS
PLATFORM
Both
PERFORMANCE
Light
LIVE PLAYGROUND
CSS / CSS
/* Glass Reflection Card — A soft reflection sweeps across the glass surface on hover. */
.glass-reflection-card {
  --dur: 900ms;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --stagger: 60ms;
  will-change: transform, opacity;
}

.glass-reflection-card > * {
  opacity: 0;
  transform: translateY(14px);
  animation: glass-reflection-card-in var(--dur) var(--ease) forwards;
  animation-delay: calc(var(--i, 0) * var(--stagger));
}

/* parked off the left edge at low opacity -> sweeping the reflection diagonally across the card once */
@keyframes glass-reflection-card-in {
  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .glass-reflection-card > * {
    opacity: 1;
    transform: none;
    animation: none;
  }
}
React / TSX
import { useEffect, useRef } from "react";

/** Glass Reflection Card — trigger: hover */
export function GlassReflectionCard({ 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="glass-reflection-card" data-state="out">
      {children}
    </div>
  );
}

IF YOU LIKE THIS, STEAL THESE TOO.

INTERACTION_098CSS

Image Reveal Card

The image uncovers from behind the card copy on hover.

Cards / LightView
PRO
$49
INTERACTION_100CSS

Floating Feature Card

A key card breathes gently above the grid to signal importance.

Cards / LightView
PRO
$49
INTERACTION_102CSS

Pricing Card Emphasis

The recommended plan lifts, brightens and holds a moving border.

Cards / LightView
CARD_01
INTERACTION_006CSS

Premium Card Lift

4px elevation with border brightening.

Cards / LightView