Viscosity Drop Card
A suspended droplet of ultra-slow-moving liquid glass. Content is refracted and magnified through the curved surface. Hover makes the droplet wobble slightly, distorting the content beneath in real-time. Clicking pulls the droplet downward, stretching it into a thin strand before it snaps back with a ripple. The droplet's thickness and refractive index are adjustable as a theme setting.
by FreeCsStyles Dev's
Embed this component
Paste this snippet into any site — the design renders in a sandboxed iframe served from /embed/viscosity-drop-card.
<iframe src="/embed/viscosity-drop-card" sandbox="allow-scripts" loading="lazy" title="Viscosity Drop Card" style="border:0;width:100%;height:480px;overflow:hidden"></iframe>Implementation code
Copy the HTML and CSS for Viscosity Drop 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="drop-card">
<div class="drop-container">
<svg class="drop-svg" viewBox="0 0 130 180">
<defs><radialGradient id="dG" cx="40%" cy="35%" r="60%"><stop offset="0%" stop-color="rgba(200,235,255,0.25)"/><stop offset="100%" stop-color="rgba(80,150,220,0.08)"/></radialGradient></defs>
<path d="M 65 10 C 75 30, 110 70, 110 110 C 110 140, 95 170, 65 170 C 35 170, 20 140, 20 110 C 20 70, 55 30, 65 10 Z" fill="url(#dG)" stroke="rgba(180,220,255,0.15)" stroke-width="1"/>
</svg>
<div class="drop-content">⬡ ✦ ⟡</div>
</div>
<div class="drop-footer">
<div class="df-row"><span class="df-title">The Droplet</span><span class="df-badge">SUSPENDED</span></div>
<div class="df-grid"><div>n=1.5<span>Refractive Index</span></div><div>1.0η<span>Viscosity</span></div></div>
<div class="df-hint">[▼ click to stretch]</div>
</div>
</div>CSS
.drop-card { position: relative; width: 220px; min-height: 300px; border-radius: 16px; overflow: hidden; background: linear-gradient(160deg, #050a12, #02060a); border: 1.5px solid rgba(180,220,255,0.08); box-shadow: 0 10px 30px rgba(0,0,0,0.3); cursor: pointer; }
.drop-card:hover { box-shadow: 0 0 40px rgba(180,220,255,0.06), 0 15px 40px rgba(0,0,0,0.4); }
.drop-container { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 3; pointer-events: none; }
.drop-svg { width: 130px; height: 180px; }
.drop-content { position: absolute; text-align: center; color: rgba(180,220,255,0.3); font-size: 10px; transform: translateY(-10px); }
.drop-footer { position: absolute; inset-x: 0; bottom: 0; z-index: 10; padding: 20px; background: linear-gradient(0deg, rgba(0,0,0,0.6), transparent); }
.df-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.df-title { font-size: 14px; font-weight: 700; color: rgba(255,255,255,0.9); }
.df-badge { padding: 2px 8px; border-radius: 2px; font-size: 7px; font-weight: 700; letter-spacing: 0.1em; color: rgba(180,220,255,0.6); background: rgba(180,220,255,0.08); border: 1px solid rgba(180,220,255,0.12); }
.df-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.df-grid div { text-align: center; padding: 6px 4px; border-radius: 8px; background: rgba(180,220,255,0.02); border: 1px solid rgba(180,220,255,0.04); font-size: 10px; font-weight: 600; color: rgba(180,220,255,0.6); }
.df-grid div span { display: block; font-size: 7px; margin-top: 2px; font-weight: 400; color: rgba(255,255,255,0.2); }
.df-hint { text-align: center; font-size: 7px; font-family: monospace; color: rgba(180,220,255,0.2); margin-top: 8px; }Tailwind CSS
<div class="group relative w-[220px] min-h-[300px] rounded-2xl overflow-hidden border border-blue-400/20 shadow-lg group-hover:shadow-[0_0_40px_rgba(180,220,255,0.06),0_15px_40px_rgba(0,0,0,0.4)] bg-gradient-to-b from-[#050a12] to-[#02060a] cursor-pointer">
<div class="absolute inset-0 flex items-center justify-center z-[3] pointer-events-none">
<svg class="w-[130px] h-[180px]" viewBox="0 0 130 180">
<defs><radialGradient id="dG2" cx="40%" cy="35%" r="60%"><stop offset="0%" stop-color="rgba(200,235,255,0.25)"/><stop offset="100%" stop-color="rgba(80,150,220,0.08)"/></radialGradient></defs>
<path d="M 65 10 C 75 30, 110 70, 110 110 C 110 140, 95 170, 65 170 C 35 170, 20 140, 20 110 C 20 70, 55 30, 65 10 Z" fill="url(#dG2)" stroke="rgba(180,220,255,0.15)" stroke-width="1"/>
</svg>
<div class="absolute text-center text-blue-300/30 text-[10px]">⬡ ✦ ⟡</div>
</div>
<div class="absolute inset-x-0 bottom-0 z-10 p-5 space-y-2 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">The Droplet</p><p class="text-[9px] text-blue-400/50">Glycerin</p></div><div class="px-2 py-0.5 rounded-sm text-[7px] font-bold tracking-widest text-blue-400 bg-blue-500/10 border border-blue-500/20">SUSPENDED</div></div>
<div class="h-px bg-gradient-to-r from-transparent via-blue-500/10 to-transparent"></div>
<div class="grid grid-cols-2 gap-2"><div class="text-center py-1.5 rounded-lg bg-blue-500/10 border border-blue-500/20"><p class="text-[10px] font-semibold text-blue-400">n=1.5</p><p class="text-[7px] mt-0.5 text-white/20">Refractive Index</p></div><div class="text-center py-1.5 rounded-lg bg-blue-500/10 border border-blue-500/20"><p class="text-[10px] font-semibold text-blue-400/60">1.0η</p><p class="text-[7px] mt-0.5 text-white/20">Viscosity</p></div></div>
<div class="text-center"><span class="text-[7px] font-mono text-blue-400/30">[▼ click to stretch]</span></div>
</div>
</div>React
import React, { useRef, useState, useCallback } from 'react';
import { motion, useMotionValue, useSpring } from 'framer-motion';
export function ViscosityDropCard({ label = 'The Droplet', liquid = 'Glycerin', width = 220, refractiveIndex = 1.5, viscosity = 1.0 }) {
const ref = useRef(null);
const [isHovered, setIsHovered] = useState(false);
const [stretched, setStretched] = useState(false);
const [rippling, setRippling] = useState(false);
const x = useMotionValue(0);
const y = useMotionValue(0);
const rotateX = useSpring(y, { damping: 22, stiffness: 220 });
const rotateY = useSpring(x, { damping: 22, stiffness: 220 });
const handleMouseMove = (e) => {
if (!ref.current) return;
const rect = ref.current.getBoundingClientRect();
const cx = rect.left + rect.width / 2;
const cy = rect.top + rect.height / 2;
x.set(-((e.clientX - cx) / (rect.width / 2)) * 8);
y.set(((e.clientY - cy) / (rect.height / 2)) * 8);
};
const handleClick = () => {
if (stretched) return;
setStretched(true);
setTimeout(() => { setRippling(true); setStretched(false); setTimeout(() => setRippling(false), 1200); }, 800 * viscosity);
};
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, #050a12, #02060a)', border: '1.5px solid rgba(180,220,255,0.08)' }}
animate={{ boxShadow: isHovered ? '0 0 40px rgba(180,220,255,0.06), 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 }}>
<div className="absolute inset-0 flex items-center justify-center z-[3] pointer-events-none">
<motion.div animate={{ scale: stretched ? 0.85 : 1, y: stretched ? 20 : 0 }} transition={{ type: 'spring', stiffness: 60 / viscosity, damping: 15, mass: viscosity * 2 }}>
<motion.div animate={{ scaleX: isHovered ? 1.02 : 1, scaleY: stretched ? 2.8 : 1 }} transition={{ duration: 3 / viscosity, repeat: Infinity, ease: 'easeInOut' }}>
<svg width="130" height="180" viewBox="0 0 130 180">
<defs><radialGradient id="dG3" cx="40%" cy="35%" r="60%"><stop offset="0%" stopColor="rgba(200,235,255,0.25)"/><stop offset="40%" stopColor="rgba(150,200,240,0.12)"/><stop offset="100%" stopColor="rgba(80,150,220,0.08)"/></radialGradient></defs>
<path d="M 65 10 C 75 30, 110 70, 110 110 C 110 140, 95 170, 65 170 C 35 170, 20 140, 20 110 C 20 70, 55 30, 65 10 Z" fill="url(#dG3)" stroke="rgba(180,220,255,0.15)" strokeWidth="1"/>
</svg>
</motion.div>
<div className="absolute inset-0 flex items-center justify-center text-blue-300/30 text-[10px] translate-y-[-10%]">⬡ ✦ ⟡</div>
</motion.div>
</div>
<div className="absolute inset-x-0 bottom-0 z-10 p-5 space-y-2 bg-gradient-to-t from-black/60 to-transparent">
<div className="flex items-center justify-between"><div><p className="text-sm font-bold text-white/90">{label}</p><p className="text-[9px] text-blue-400/50">{liquid}</p></div><motion.div className="px-2 py-0.5 rounded-sm text-[7px] font-bold tracking-widest text-blue-400 bg-blue-500/10 border border-blue-500/20" animate={stretched ? { opacity: [0.5, 1, 0.5] } : {}} transition={{ duration: 0.5, repeat: stretched ? Infinity : 0 }}>{rippling ? 'RIPPLE' : stretched ? 'STRETCH' : isHovered ? 'WOBBLE' : 'SUSPENDED'}</motion.div></div>
<div className="text-center"><span className="text-[7px] font-mono text-blue-400/30">[▼ click to stretch]</span></div>
</div>
</motion.div>
</motion.div>
</div>
);
}Where Viscosity Drop Card fits
- Premium Liquid Effects
- Interactive Glass UI
- Product Showcases
- Artistic Displays
Interaction states & animations
- Droplet wobble
- Stretch and snap
- Refraction shimmer
- Ripple propagation
- Magnification pulse
Topics
- #liquid-glass
- #droplet
- #viscosity
- #refraction
- #magnification
- #wobble
- #ripple
- #glass
- #fluid
- #organic
Accessibility notes
The wobble and ripple effects may be disorienting. Provide prefers-reduced-motion fallback. Ensure text contrast is sufficient on glass surfaces.
Browser support
- Chrome 90+
- Firefox 105+
- Safari 15+
- Edge 90+