Prismatic Meniscus Card
A card with a visible, curved meniscus edge where liquid glass meets its container. Content appears to float inside the liquid volume, slightly magnified. Tilting the device (on mobile) or moving the cursor shifts the liquid and the content within. Light sources refract through the glass, casting small rainbows on adjacent elements.
by FreeCsStyles Dev's
Embed this component
Paste this snippet into any site — the design renders in a sandboxed iframe served from /embed/prismatic-meniscus-card.
<iframe src="/embed/prismatic-meniscus-card" sandbox="allow-scripts" loading="lazy" title="Prismatic Meniscus Card" style="border:0;width:100%;height:480px;overflow:hidden"></iframe>Implementation code
Copy the HTML and CSS for Prismatic Meniscus 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="meniscus-card">
<div class="meniscus-vessel">
<div class="meniscus-border"></div>
<div class="meniscus-liquid">
<div class="meniscus-top"></div>
<div class="meniscus-content">⬡ ⬢ ⬡<span>content suspended in liquid volume</span></div>
</div>
</div>
<div class="meniscus-footer">
<div class="mf-row"><span>Meniscus Vessel</span><span class="mf-badge">AT REST</span></div>
<div class="mf-grid"><div>40%<span>Meniscus</span></div><div>0<span>Rainbows</span></div></div>
<div class="mf-hint">[▼ tilt to shift liquid, click for rainbow]</div>
</div>
</div>CSS
.meniscus-card { position: relative; width: 220px; min-height: 300px; border-radius: 16px; overflow: hidden; background: linear-gradient(160deg, #080a12, #04060a); border: 1.5px solid rgba(150,200,255,0.08); box-shadow: 0 10px 30px rgba(0,0,0,0.3); cursor: pointer; }
.meniscus-card:hover { box-shadow: 0 0 40px rgba(150,200,255,0.06), 0 15px 40px rgba(0,0,0,0.4); }
.meniscus-vessel { position: absolute; inset: 10%; bottom: 30%; z-index: 3; pointer-events: none; border-radius: 12px; overflow: hidden; border: 1.5px solid rgba(150,200,255,0.08); background: linear-gradient(135deg, rgba(150,200,255,0.02), rgba(100,150,220,0.04)); }
.meniscus-border { position: absolute; inset: 0; border-radius: 12px; }
.meniscus-liquid { position: absolute; bottom: 0; left: 0; right: 0; height: 70%; background: linear-gradient(180deg, rgba(150,200,255,0.06), rgba(100,180,240,0.1)); border-radius: 0 0 12px 12px; }
.meniscus-top { position: absolute; top: 0; left: 0; right: 0; height: 12px; background: linear-gradient(180deg, rgba(150,200,255,0.12), transparent); border-radius: 50% 50% 0 0; }
.meniscus-content { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; color: rgba(150,200,255,0.4); font-size: 9px; }
.meniscus-content span { font-size: 7px; color: rgba(150,200,255,0.2); margin-top: 4px; }
.meniscus-footer { position: absolute; inset-x: 0; bottom: 0; z-index: 10; padding: 20px; background: linear-gradient(0deg, rgba(0,0,0,0.6), transparent); }
.mf-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.mf-row span:first-child { font-size: 14px; font-weight: 700; color: rgba(255,255,255,0.9); }
.mf-badge { padding: 2px 8px; border-radius: 2px; font-size: 7px; font-weight: 700; letter-spacing: 0.1em; color: rgba(150,200,255,0.6); background: rgba(150,200,255,0.08); border: 1px solid rgba(150,200,255,0.12); }
.mf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.mf-grid div { text-align: center; padding: 6px 4px; border-radius: 8px; background: rgba(150,200,255,0.02); border: 1px solid rgba(150,200,255,0.04); font-size: 10px; font-weight: 600; color: rgba(150,200,255,0.6); }
.mf-grid div span { display: block; font-size: 7px; margin-top: 2px; font-weight: 400; color: rgba(255,255,255,0.2); }
.mf-hint { text-align: center; font-size: 7px; font-family: monospace; color: rgba(150,200,255,0.2); }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,255,0.06),0_15px_40px_rgba(0,0,0,0.4)] bg-gradient-to-b from-[#080a12] to-[#04060a] cursor-pointer">
<div class="absolute inset-[10%] bottom-[30%] z-[3] pointer-events-none rounded-xl overflow-hidden border border-sky-400/20 bg-gradient-to-br from-sky-400/5 to-blue-400/10">
<div class="absolute bottom-0 left-0 right-0 h-[70%] bg-gradient-to-t from-sky-500/10 to-transparent rounded-b-xl">
<div class="absolute top-0 left-0 right-0 h-3 bg-gradient-to-b from-sky-400/20 to-transparent rounded-t-full"></div>
</div>
<div class="absolute inset-0 flex flex-col items-center justify-center text-sky-400/40 text-[9px]"><span>⬡ ⬢ ⬡</span><span class="text-[7px] text-sky-400/20 mt-1">content in liquid volume</span></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">Meniscus Vessel</p><p class="text-[9px] text-sky-400/50">Distilled Water</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">AT REST</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">40%</p><p class="text-[7px] mt-0.5 text-white/20">Meniscus</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">0</p><p class="text-[7px] mt-0.5 text-white/20">Rainbows</p></div></div>
<div class="text-center"><span class="text-[7px] font-mono text-sky-400/30">[▼ tilt to shift liquid, click for rainbow]</span></div>
</div>
</div>React
import React, { useRef, useState, useCallback } from 'react';
import { motion, useMotionValue, useSpring } from 'framer-motion';
export function PrismaticMeniscusCard({ label = 'Meniscus Vessel', liquid = 'Distilled Water', width = 220, curvature = 40 }) {
const ref = useRef(null);
const [isHovered, setIsHovered] = useState(false);
const [mousePos, setMousePos] = useState({ x: 0.5, y: 0.5 });
const [rainbows, setRainbows] = useState([]);
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();
setMousePos({ x: (e.clientX - rect.left) / rect.width, y: (e.clientY - rect.top) / rect.height });
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 = () => {
const newRb = { id: Date.now(), x: mousePos.x * 100, y: mousePos.y * 100, angle: Math.random() * 60 - 30 };
setRainbows(prev => [...prev.slice(-4), newRb]);
setTimeout(() => setRainbows(prev => prev.filter(r => r.id !== newRb.id)), 2000);
};
const liquidShiftX = (mousePos.x - 0.5) * 6;
const liquidShiftY = (mousePos.y - 0.5) * 4;
return (
<div onMouseEnter={() => setIsHovered(true)} onMouseLeave={() => { setIsHovered(false); x.set(0); y.set(0); setMousePos({ x: 0.5, y: 0.5 }); }}>
<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, #080a12, #04060a)', border: '1.5px solid rgba(150,200,255,0.08)' }}
animate={{ boxShadow: isHovered ? '0 0 40px rgba(150,200,255,0.06), 0 15px 40px rgba(0,0,0,0.4)' : '0 10px 30px rgba(0,0,0,0.3)' }}>
<div className="absolute inset-[10%] bottom-[30%] z-[3] pointer-events-none rounded-xl overflow-hidden" style={{ border: '1.5px solid rgba(150,200,255,0.08)', background: 'linear-gradient(135deg, rgba(150,200,255,0.02), rgba(100,150,220,0.04))' }}>
<motion.div className="absolute bottom-0 left-0 right-0 rounded-b-xl" style={{ height: '70%', background: 'linear-gradient(180deg, rgba(150,200,255,0.06), rgba(100,180,240,0.1))' }} animate={{ x: liquidShiftX * 0.5, y: liquidShiftY * 0.3 }} transition={{ type: 'spring', stiffness: 100, damping: 15 }}>
<motion.div className="absolute top-0 left-0 right-0 h-3" style={{ background: 'linear-gradient(180deg, rgba(150,200,255,0.12), transparent)', borderRadius: `${curvature / 100 * 50}% ${curvature / 100 * 50}% 0 0` }} />
</motion.div>
<motion.div className="absolute inset-0 flex items-center justify-center text-sky-400/40 text-[9px]" animate={{ x: liquidShiftX, y: liquidShiftY }} transition={{ type: 'spring', stiffness: 80, damping: 12 }}>⬡ ⬢ ⬡</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-sky-400/50">{liquid}</p></div><motion.div className="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">{isHovered ? 'SHIFTING' : 'AT REST'}</motion.div></div>
<div className="text-center"><span className="text-[7px] font-mono text-sky-400/30">[▼ tilt to shift liquid, click for rainbow]</span></div>
</div>
</motion.div>
</motion.div>
</div>
);
}Where Prismatic Meniscus Card fits
- Premium Data Visualization
- Interactive Liquid UI
- Scientific Displays
- Artistic Dashboards
Interaction states & animations
- Liquid shifting
- Meniscus curve bend
- Content float
- Rainbow refraction
- Surface shimmer
Topics
- #liquid-glass
- #meniscus
- #prismatic
- #refraction
- #rainbow
- #liquid
- #glass-vessel
- #floating-content
- #cursor-responsive
Accessibility notes
Rainbow refractions are decorative and not essential. Ensure text content has sufficient contrast. Provide reduced motion alternative for liquid shifting.
Browser support
- Chrome 90+
- Firefox 105+
- Safari 15+
- Edge 90+