Suspended Droplet Constellation Card
Instead of one card, multiple tiny glass droplets float in a loose arrangement. Each droplet contains a fragment of content, magnified and inverted. Hover attracts droplets together, merging them into a larger, more complete card. Clicking splits a merged droplet back into its components. The surface tension between merging droplets creates a beautiful, brief liquid bridge.
by FreeCsStyles Dev's
Embed this component
Paste this snippet into any site — the design renders in a sandboxed iframe served from /embed/suspended-droplet-constellation-card.
<iframe src="/embed/suspended-droplet-constellation-card" sandbox="allow-scripts" loading="lazy" title="Suspended Droplet Constellation Card" style="border:0;width:100%;height:480px;overflow:hidden"></iframe>Implementation code
Copy the HTML and CSS for Suspended Droplet Constellation 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="constellation-card">
<div class="constellation-field">
<svg class="constellation-svg" viewBox="0 0 200 160">
<defs><radialGradient id="cG" cx="35%" cy="30%" r="60%"><stop offset="0%" stop-color="rgba(200,230,255,0.2)"/><stop offset="100%" stop-color="rgba(150,200,240,0.05)"/></radialGradient></defs>
<g opacity="0.3">
<line x1="50" y1="50" x2="100" y2="30" stroke="rgba(150,200,240,0.2)" stroke-width="0.5"/>
<line x1="100" y1="30" x2="150" y2="50" stroke="rgba(150,200,240,0.2)" stroke-width="0.5"/>
<line x1="150" y1="50" x2="130" y2="100" stroke="rgba(150,200,240,0.2)" stroke-width="0.5"/>
<line x1="130" y1="100" x2="70" y2="100" stroke="rgba(150,200,240,0.2)" stroke-width="0.5"/>
<line x1="70" y1="100" x2="50" y2="50" stroke="rgba(150,200,240,0.2)" stroke-width="0.5"/>
</g>
<path d="M 50 50 C 60 40, 70 40, 70 50 C 70 60, 60 60, 50 50 Z" fill="url(#cG)" stroke="rgba(150,200,240,0.12)" stroke-width="0.5"/>
<path d="M 100 30 C 110 20, 120 20, 120 30 C 120 40, 110 40, 100 30 Z" fill="url(#cG)" stroke="rgba(150,200,240,0.12)" stroke-width="0.5"/>
<path d="M 150 50 C 160 40, 170 40, 170 50 C 170 60, 160 60, 150 50 Z" fill="url(#cG)" stroke="rgba(150,200,240,0.12)" stroke-width="0.5"/>
<path d="M 130 100 C 140 90, 150 90, 150 100 C 150 110, 140 110, 130 100 Z" fill="url(#cG)" stroke="rgba(150,200,240,0.12)" stroke-width="0.5"/>
<path d="M 70 100 C 80 90, 90 90, 90 100 C 90 110, 80 110, 70 100 Z" fill="url(#cG)" stroke="rgba(150,200,240,0.12)" stroke-width="0.5"/>
</svg>
</div>
<div class="constellation-footer">
<div class="cf-row"><span>Droplet Field</span><span class="cf-badge">FLOATING</span></div>
<div class="cf-grid"><div>8<span>Droplets</span></div><div>1.0σ<span>Tension</span></div></div>
<div class="cf-hint">[▼ hover to merge droplets]</div>
</div>
</div>CSS
.constellation-card { position: relative; width: 220px; min-height: 300px; border-radius: 16px; overflow: hidden; background: linear-gradient(160deg, #060a12, #02040a); border: 1.5px solid rgba(150,200,240,0.08); box-shadow: 0 10px 30px rgba(0,0,0,0.3); cursor: pointer; }
.constellation-card:hover { box-shadow: 0 0 40px rgba(150,200,240,0.06), 0 15px 40px rgba(0,0,0,0.4); }
.constellation-field { position: absolute; inset: 5%; bottom: 30%; z-index: 3; pointer-events: none; }
.constellation-svg { width: 100%; height: 100%; }
.constellation-footer { position: absolute; inset-x: 0; bottom: 0; z-index: 10; padding: 20px; background: linear-gradient(0deg, rgba(0,0,0,0.6), transparent); }
.cf-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.cf-row span:first-child { font-size: 14px; font-weight: 700; color: rgba(255,255,255,0.9); }
.cf-badge { padding: 2px 8px; border-radius: 2px; font-size: 7px; font-weight: 700; letter-spacing: 0.1em; color: rgba(150,200,240,0.6); background: rgba(150,200,240,0.08); border: 1px solid rgba(150,200,240,0.12); }
.cf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.cf-grid div { text-align: center; padding: 6px 4px; border-radius: 8px; background: rgba(150,200,240,0.02); border: 1px solid rgba(150,200,240,0.04); font-size: 10px; font-weight: 600; color: rgba(150,200,240,0.6); }
.cf-grid div span { display: block; font-size: 7px; margin-top: 2px; font-weight: 400; color: rgba(255,255,255,0.2); }
.cf-hint { text-align: center; font-size: 7px; font-family: monospace; color: rgba(150,200,240,0.2); margin-top: 8px; }Tailwind CSS
<div class="group relative w-[220px] min-h-[300px] rounded-2xl overflow-hidden border border-sky-400/20 shadow-lg group-hover:shadow-[0_0_40px_rgba(150,200,240,0.06),0_15px_40px_rgba(0,0,0,0.4)] bg-gradient-to-b from-[#060a12] to-[#02040a] cursor-pointer">
<div class="absolute inset-[5%] bottom-[30%] z-[3] pointer-events-none">
<svg class="w-full h-full opacity-30" viewBox="0 0 200 160">
<g>
<line x1="50" y1="50" x2="100" y2="30" stroke="rgba(150,200,240,0.2)" stroke-width="0.5"/>
<line x1="100" y1="30" x2="150" y2="50" stroke="rgba(150,200,240,0.2)" stroke-width="0.5"/>
<line x1="150" y1="50" x2="130" y2="100" stroke="rgba(150,200,240,0.2)" stroke-width="0.5"/>
<line x1="130" y1="100" x2="70" y2="100" stroke="rgba(150,200,240,0.2)" stroke-width="0.5"/>
<line x1="70" y1="100" x2="50" y2="50" stroke="rgba(150,200,240,0.2)" stroke-width="0.5"/>
</g>
</svg>
</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">Droplet Field</p><p class="text-[9px] text-sky-400/50">Glycerin</p></div><div class="px-2 py-0.5 rounded-sm text-[7px] font-bold tracking-widest text-sky-400 bg-sky-500/10 border border-sky-500/20">FLOATING</div></div>
<div class="h-px bg-gradient-to-r from-transparent via-sky-500/10 to-transparent"></div>
<div class="grid grid-cols-2 gap-2"><div class="text-center py-1.5 rounded-lg bg-sky-500/10 border border-sky-500/20"><p class="text-[10px] font-semibold text-sky-400">8</p><p class="text-[7px] mt-0.5 text-white/20">Droplets</p></div><div class="text-center py-1.5 rounded-lg bg-sky-500/10 border border-sky-500/20"><p class="text-[10px] font-semibold text-sky-400">1.0σ</p><p class="text-[7px] mt-0.5 text-white/20">Tension</p></div></div>
<div class="text-center"><span class="text-[7px] font-mono text-sky-400/30">[▼ hover to merge droplets]</span></div>
</div>
</div>React
import React, { useRef, useState, useCallback } from 'react';
import { motion, useMotionValue, useSpring, AnimatePresence } from 'framer-motion';
export function SuspendedDropletConstellationCard({ title = 'Droplet Field', medium = 'Glycerin', width = 220, surfaceTension = 1.0 }) {
const ref = useRef(null);
const [isHovered, setIsHovered] = useState(false);
const [mergedIds, setMergedIds] = useState(new Set());
const [bridgeForming, setBridgeForming] = 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 contents = ['⬡','⬢','✦','⟡','⬟','⬠','◆','◇'];
const droplets = contents.map((c, i) => {
const angle = (i / contents.length) * Math.PI * 2;
const radius = 28 + Math.random() * 12;
return { id: i, x: 50 + Math.cos(angle) * radius, y: 40 + Math.sin(angle) * radius * 0.8, content: c, size: 6 + Math.floor(Math.random() * 4) };
});
const handleClickSplit = () => { if (mergedIds.size > 0) setMergedIds(new Set()); };
const handleEnter = () => {
setIsHovered(true);
if (mergedIds.size > 0) return;
setBridgeForming(true);
setTimeout(() => { setMergedIds(new Set([0, 1])); setBridgeForming(false); }, 600 / surfaceTension);
};
const unmerged = droplets.filter(d => !mergedIds.has(d.id));
const mergedPos = { x: (droplets[0].x + droplets[1].x) / 2, y: (droplets[0].y + droplets[1].y) / 2 };
return (
<div onMouseEnter={handleEnter} onMouseLeave={() => { setIsHovered(false); x.set(0); y.set(0); }}>
<motion.div ref={ref} onMouseMove={handleMouseMove} onClick={handleClickSplit} 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, #060a12, #02040a)', border: '1.5px solid rgba(150,200,240,0.08)' }}
animate={{ boxShadow: isHovered ? '0 0 40px rgba(150,200,240,0.06), 0 15px 40px rgba(0,0,0,0.4)' : '0 10px 30px rgba(0,0,0,0.3)' }}>
<div className="absolute inset-[5%] bottom-[30%] z-[3] pointer-events-none">
{unmerged.map(d => (
<motion.div key={d.id} className="absolute" style={{ left: `${d.x}%`, top: `${d.y}%`, transform: 'translate(-50%,-50%)' }}
animate={{ scale: isHovered ? [1, 1.1, 1] : 1 }} transition={{ duration: 1.5 + d.id * 0.2, repeat: Infinity }}>
<span className="text-[10px]" style={{ color: 'rgba(150,200,240,0.4)' }}>{d.content}</span>
</motion.div>
))}
{mergedIds.size > 0 && (
<motion.div className="absolute z-[5]" style={{ left: `${mergedPos.x}%`, top: `${mergedPos.y}%`, transform: 'translate(-50%,-50%)' }} initial={{ scale: 0 }} animate={{ scale: 1 }}>
<div className="text-[11px] text-sky-400/50">{droplets.filter(d => mergedIds.has(d.id)).map(d => d.content).join(' ')}</div>
<div className="text-[6px] font-mono text-sky-400/20 text-center">merged</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">{title}</p><p className="text-[9px] text-sky-400/50">{medium}</p></div><motion.div className="px-2 py-0.5 rounded-sm text-[7px] font-bold tracking-widest" style={{ background: mergedIds.size > 0 ? 'rgba(200,230,255,0.1)' : 'rgba(150,200,240,0.08)', border: mergedIds.size > 0 ? '1px solid rgba(200,230,255,0.15)' : '1px solid rgba(150,200,240,0.12)', color: mergedIds.size > 0 ? 'rgba(200,230,255,0.7)' : 'rgba(150,200,240,0.6)' }}>{mergedIds.size > 0 ? 'MERGED' : isHovered ? 'ATTRACTING' : 'FLOATING'}</motion.div></div>
<div className="text-center"><span className="text-[7px] font-mono text-sky-400/30">{mergedIds.size > 0 ? '[▼ click to split]' : '[▼ hover to merge droplets]'}</span></div>
</div>
</motion.div>
</motion.div>
</div>
);
}Where Suspended Droplet Constellation Card fits
- Interactive Art Displays
- Modular UI Concepts
- Creative Portfolios
- Experimental Design
Interaction states & animations
- Droplet float
- Constellation attraction
- Liquid bridge
- Merging animation
- Split separation
Topics
- #liquid-glass
- #droplet
- #constellation
- #floating
- #merge
- #surface-tension
- #liquid-bridge
- #modular
- #interactive
- #creative
Accessibility notes
The floating and merging behavior may be confusing for screen readers. Provide alternative static description. The liquid bridge effect is purely decorative.
Browser support
- Chrome 90+
- Firefox 105+
- Safari 15+
- Edge 90+