Skip to content

Interference Pattern Card

A wave-mechanics card where the background is a moiré pattern that shifts as the card moves in the viewport. Hover creates concentric ripples like two stones dropped in a pond, generating complex interference. Clicking freezes the pattern, capturing a unique, unrepeatable abstract composition frozen in time.

Interference Pattern Card

by FreeCsStyles Dev's

CardsHologram
🌐🎨⚛️💚🅰️🔥☁️
#interference#moiré#wave#ripple#pattern#physics#hologram#optical#freeze#concentric

Embed this component

Paste this snippet into any site — the design renders in a sandboxed iframe served from /embed/interference-pattern-card.

<iframe src="/embed/interference-pattern-card" sandbox="allow-scripts" loading="lazy" title="Interference Pattern Card" style="border:0;width:100%;height:480px;overflow:hidden"></iframe>

Implementation code

Copy the HTML and CSS for Interference Pattern Card, or grab a framework-specific implementation. The HTML and CSS variants are self-contained; framework variants assume that framework's project setup.

HTML
<div class="interference-card">
  <div class="interference-pattern"></div>
  <div class="interference-ripple" id="ripple1"></div>
  <div class="interference-ripple" id="ripple2"></div>
  <div class="interference-footer">
    <div><div class="i-title">Moiré Drift</div><div class="i-sub">0.618 Hz</div></div>
    <div class="i-status">DRIFTING</div>
  </div>
</div>
CSS
.interference-card { position: relative; width: 220px; min-height: 300px; border-radius: 16px; overflow: hidden; background: linear-gradient(160deg, #08080e, #04040a); border: 1.5px solid rgba(150,200,255,0.06); box-shadow: 0 10px 30px rgba(0,0,0,0.3); cursor: pointer; }
.interference-card:hover { box-shadow: 0 0 30px rgba(150,200,255,0.06), 0 15px 40px rgba(0,0,0,0.4); }
.interference-pattern { position: absolute; inset: 0; pointer-events: none; z-index: 2; opacity: 0.4; background: repeating-linear-gradient(0deg, transparent, transparent 23px, rgba(150,200,255,0.04) 23px, rgba(150,200,255,0.06) 24px), repeating-linear-gradient(90deg, transparent, transparent 23px, rgba(150,200,255,0.04) 23px, rgba(150,200,255,0.06) 24px); background-size: 48px 48px; animation: pattern-drift 8s linear infinite; }
@keyframes pattern-drift { 0% { background-position: 0 0; } 100% { background-position: 48px 48px; } }
.interference-ripple { position: absolute; border-radius: 50%; border: 1px solid rgba(150,200,255,0.06); pointer-events: none; z-index: 3; animation: ripple-expand 2s ease-out infinite; }
#ripple1 { width: 50%; height: 50%; top: 50%; left: 50%; transform: translate(-50%, -50%); animation-delay: 0s; }
#ripple2 { width: 50%; height: 50%; top: 50%; left: 50%; transform: translate(-50%, -50%); animation-delay: 1s; }
@keyframes ripple-expand { 0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0.3; } 100% { transform: translate(-50%, -50%) scale(3); opacity: 0; } }
.interference-footer { position: absolute; inset-x: 0; bottom: 0; z-index: 10; padding: 20px; background: linear-gradient(0deg, rgba(0,0,0,0.6), transparent); }
.i-title { font-size: 14px; font-weight: 700; color: rgba(255,255,255,0.9); }
.i-sub { font-size: 9px; color: rgba(150,200,255,0.44); }
.i-status { padding: 2px 8px; border-radius: 2px; font-size: 7px; font-weight: 700; letter-spacing: 0.1em; display: inline-block; background: rgba(150,200,255,0.08); border: 1px solid rgba(150,200,255,0.12); color: rgba(150,200,255,0.6); }
Tailwind CSS
<div class="group relative w-[220px] min-h-[300px] rounded-2xl overflow-hidden border border-blue-300/10 shadow-lg group-hover:shadow-[0_0_30px_rgba(150,200,255,0.06),0_15px_40px_rgba(0,0,0,0.4)] bg-gradient-to-b from-[#08080e] to-[#04040a] cursor-pointer">
  <div class="absolute inset-0 z-[2] pointer-events-none opacity-40" style="background: repeating-linear-gradient(0deg, transparent, transparent 23px, rgba(150,200,255,0.04) 23px, rgba(150,200,255,0.06) 24px), repeating-linear-gradient(90deg, transparent, transparent 23px, rgba(150,200,255,0.04) 23px, rgba(150,200,255,0.06) 24px); background-size: 48px 48px;"></div>
  <div class="absolute inset-x-0 bottom-0 z-10 p-5 bg-gradient-to-t from-black/60 to-transparent">
    <div class="flex items-center justify-between"><div><p class="text-sm font-bold text-white/90">Moiré Drift</p><p class="text-[9px] text-blue-300/50">0.618 Hz</p></div><div class="px-2 py-0.5 rounded-sm text-[7px] font-bold tracking-widest bg-blue-300/10 border border-blue-300/20 text-blue-300/60">DRIFTING</div></div>
  </div>
</div>
React
import React, { useState, useRef, useCallback, useEffect } from 'react';
import { motion, useMotionValue, useSpring } from 'framer-motion';

export function InterferencePatternCard({ patternName = 'Moiré Drift', width = 220, wavelength = 24 }) {
  const ref = useRef(null);
  const [isHovered, setIsHovered] = useState(false);
  const [isFrozen, setIsFrozen] = useState(false);
  const [rippleCenter, setRippleCenter] = useState({ x: 50, y: 50 });
  const [captures, setCaptures] = useState(0);
  const x = useMotionValue(0);
  const y = useMotionValue(0);
  const rotateX = useSpring(y, { damping: 25, stiffness: 200 });
  const rotateY = useSpring(x, { damping: 25, stiffness: 200 });
  const handleMouseMove = (e) => {
    if (!ref.current) return;
    const rect = ref.current.getBoundingClientRect();
    x.set(-((e.clientX - rect.left - rect.width / 2) / (rect.width / 2)) * 6);
    y.set(((e.clientY - rect.top - rect.height / 2) / (rect.height / 2)) * 6);
    setRippleCenter({ x: ((e.clientX - rect.left) / rect.width) * 100, y: ((e.clientY - rect.top) / rect.height) * 100 });
  };
  const handleClick = () => { setIsFrozen(p => !p); if (!isFrozen) setCaptures(c => c + 1); };
  return (
    <div onMouseEnter={() => setIsHovered(true)} onMouseLeave={() => { setIsHovered(false); x.set(0); y.set(0); }}>
      <motion.div ref={ref} onMouseMove={handleMouseMove} onClick={handleClick} style={{ rotateX, rotateY, transformStyle: 'preserve-3d' }} className="relative cursor-pointer">
        <motion.div className="relative overflow-hidden rounded-2xl" style={{ width, minHeight: 300, background: 'linear-gradient(160deg, #08080e, #04040a)', border: '1.5px solid rgba(150,200,255,0.06)' }}
          animate={{ boxShadow: isHovered && !isFrozen ? '0 0 30px rgba(150,200,255,0.06), 0 15px 40px rgba(0,0,0,0.4)' : isFrozen ? '0 0 20px rgba(150,200,255,0.04), 0 15px 40px rgba(0,0,0,0.4)' : '0 10px 30px rgba(0,0,0,0.3)' }} transition={{ type: 'spring', stiffness: 260, damping: 20 }}>
          <motion.div className="absolute inset-0 z-[2] pointer-events-none" animate={isFrozen ? {} : { backgroundPositionX: [0, wavelength * 2, 0], backgroundPositionY: [0, wavelength, 0] }} transition={{ duration: isFrozen ? 0 : 8, repeat: isFrozen ? 0 : Infinity, ease: 'linear' }}>
            <div className="absolute inset-0" style={{ background: 'repeating-linear-gradient(0deg, transparent, transparent ' + (wavelength - 1) + 'px, rgba(150,200,255,0.04) ' + (wavelength - 1) + 'px, rgba(150,200,255,0.06) ' + wavelength + 'px), repeating-linear-gradient(90deg, transparent, transparent ' + (wavelength - 1) + 'px, rgba(150,200,255,0.04) ' + (wavelength - 1) + 'px, rgba(150,200,255,0.06) ' + wavelength + 'px)', backgroundSize: (wavelength * 2) + 'px ' + (wavelength * 2) + 'px', opacity: isFrozen ? 0.6 : 0.5 }} />
          </motion.div>
          {isHovered && (<motion.div className="absolute z-[3] pointer-events-none" style={{ left: rippleCenter.x - 30 + '%', top: rippleCenter.y - 30 + '%', width: '60%', height: '60%', transform: 'translate(-50%, -50%)' }}>
            {[0, 0.5, 1].map((d, i) => <motion.div key={i} className="absolute inset-0 rounded-full" style={{ border: '1px solid rgba(150,200,255,0.06)' }} animate={isFrozen ? { scale: 1, opacity: 0.3 } : { scale: [0.5, 3], opacity: [0.3, 0] }} transition={{ duration: 2, repeat: isFrozen ? 0 : Infinity, ease: 'easeOut', delay: d }} />)}
          </motion.div>)}
          <div className="absolute inset-x-0 bottom-0 z-10 p-5 bg-gradient-to-t from-black/60 to-transparent">
            <div className="flex items-center justify-between mb-2"><div><p className="text-sm font-bold text-white/90">{patternName}</p><p className="text-[9px] text-blue-300/50">0.618 Hz</p></div><motion.div className="px-2 py-0.5 rounded-sm text-[7px] font-bold tracking-widest" style={{ background: 'rgba(150,200,255,0.08)', border: '1px solid rgba(150,200,255,0.12)', color: 'rgba(150,200,255,0.6)' }}>{isFrozen ? 'FROZEN' : 'DRIFTING'}</motion.div></div>
            <div className="h-px bg-gradient-to-r from-transparent via-blue-300/10 to-transparent mb-2" />
            <div className="flex gap-2 mb-2"><div className="flex-1 text-center py-1.5 rounded-lg bg-blue-300/5 border border-blue-300/10"><p className="text-[10px] font-semibold text-blue-300/60">{wavelength}px</p><p className="text-[7px] mt-0.5 text-white/20">Wavelength</p></div><div className="flex-1 text-center py-1.5 rounded-lg bg-blue-300/5 border border-blue-300/10"><p className="text-[10px] font-semibold text-blue-300/60">{captures}</p><p className="text-[7px] mt-0.5 text-white/20">Captures</p></div></div>
            <div className="text-center"><span className="text-[7px] font-mono text-blue-300/20">{isFrozen ? '[▼ click to resume]' : '[▼ click to freeze]'}</span></div>
          </div>
        </motion.div>
      </motion.div>
    </div>
  );
}

Where Interference Pattern Card fits

  • Physics simulations
  • Wave mechanics visualizer
  • Artistic showcases
  • Ambient dashboards
  • Scientific UIs

Interaction states & animations

  • Moiré pattern drift
  • Concentric ripple propagation
  • Interference simulation
  • Freeze frame capture

Topics

  • #interference
  • #moiré
  • #wave
  • #ripple
  • #pattern
  • #physics
  • #hologram
  • #optical
  • #freeze
  • #concentric

Accessibility notes

The moiré pattern and ripple effects may cause visual discomfort for users with motion sensitivity or vestibular disorders. Provide prefers-reduced-motion fallback that renders a static pattern. Ensure all interactive states are communicated via text alternatives.

Browser support

  • Chrome 90+
  • Firefox 105+
  • Safari 15+
  • Edge 90+