Tea Leaf Reading Card
A serene cup of tea that reveals its fortune when clicked. The cup drains to show abstract tea leaf patterns at the bottom. Each hovered cluster glows and shows a floating interpretation tooltip. Every visit brews a unique pattern made from randomized tea leaves.
Tea Leaf Reading Card
by FreeCsStyles Dev's
CardsTea Leaf Divination
🌐HTML/CSS🎨Tailwind⚛️React💚Vue🅰️Angular🔥Svelte☁️LWC
#Tea#Leaves#Fortune#Steam#Ceremonial#Divination#Interactive
Embed this component
Paste this snippet into any site — the design renders in a sandboxed iframe served from /embed/tea-leaf-reading-card.
<iframe src="/embed/tea-leaf-reading-card" sandbox="allow-scripts" loading="lazy" title="Tea Leaf Reading Card" style="border:0;width:100%;height:480px;overflow:hidden"></iframe>Implementation code
Copy the HTML and CSS for Tea Leaf Reading 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="tea-card" onclick="toggleDrain()">
<div class="tea-steam" id="tea-steam"></div>
<div class="tea-cup">
<div class="tea-saucer"></div>
<div class="tea-body"><div class="tea-liquid" id="tea-liquid"></div></div>
</div>
<div class="tea-leaves" id="tea-leaves"></div>
<div class="tea-content">
<div class="tea-header">
<div><div class="tea-title">Earl Grey</div><div class="tea-sub">Tea Leaf Reading</div></div>
<div class="tea-status" id="tea-status">STEEP</div>
</div>
<div class="tea-grid">
<div class="tea-stat"><div class="tea-stat-val" id="tea-count">...</div><div class="tea-stat-lbl">Leaves</div></div>
<div class="tea-stat"><div class="tea-stat-val">What lies ahead?</div><div class="tea-stat-lbl">Fortune</div></div>
</div>
<div class="tea-hint" id="tea-hint">[▼ click to read leaves]</div>
</div>
</div>CSS
.tea-card {
position: relative;
width: 220px;
min-height: 300px;
border-radius: 16px;
overflow: hidden;
background: linear-gradient(160deg, #1a1410, #120e0a);
border: 1.5px solid rgba(212,165,116,0.1);
box-shadow: 0 10px 30px rgba(0,0,0,0.3);
cursor: pointer;
}
.tea-card:hover { box-shadow: 0 0 30px rgba(212,165,116,0.06), 0 15px 40px rgba(0,0,0,0.4); }
.tea-steam { position: absolute; top: 20%; left: 35%; right: 35%; height: 20px; pointer-events: none; z-index: 2; }
.tea-cup { position: absolute; top: 12%; left: 50%; transform: translateX(-50%); z-index: 3; pointer-events: none; }
.tea-saucer { width: 80px; height: 6px; border-radius: 50%; background: rgba(212,165,116,0.08); border: 1px solid rgba(212,165,116,0.08); margin: 0 auto; }
.tea-body { width: 60px; height: 50px; margin: -2px auto 0; border-radius: 0 0 8px 8px; background: linear-gradient(180deg, rgba(212,165,116,0.04), rgba(212,165,116,0.1)); border: 1.5px solid rgba(212,165,116,0.12); border-top: none; position: relative; }
.tea-liquid { position: absolute; bottom: 3px; left: 3px; right: 3px; border-radius: 0 0 6px 6px; background: rgba(180,120,60,0.2); height: 65%; transition: height 1.2s ease, opacity 1.2s ease; }
.tea-leaves { position: absolute; inset: 0; pointer-events: none; z-index: 4; opacity: 0; }
.tea-content { position: absolute; inset-x: 0; bottom: 0; z-index: 10; padding: 20px; background: linear-gradient(0deg, rgba(0,0,0,0.6), transparent); }
.drained .tea-liquid { height: 0 !important; opacity: 0 !important; }
.drained .tea-leaves { opacity: 1 !important; }
.drained .tea-steam { opacity: 0 !important; }Tailwind CSS
<div class="group relative w-[220px] min-h-[300px] rounded-2xl overflow-hidden border border-amber-700/20 shadow-lg group-hover:shadow-[0_0_30px_rgba(212,165,116,0.06),0_15px_40px_rgba(0,0,0,0.4)] bg-gradient-to-b from-[#1a1410] to-[#120e0a] cursor-pointer" onclick="this.classList.toggle('drained')">
<div class="absolute top-[20%] left-[35%] right-[35%] h-5 pointer-events-none z-2 group-has-[.drained]:opacity-0 transition-opacity">
<div class="w-1 h-1.5 rounded-full bg-amber-500/20 blur-sm mx-auto animate-pulse"></div>
</div>
<div class="absolute top-[12%] left-1/2 -translate-x-1/2 z-3 pointer-events-none">
<div class="w-20 h-1.5 rounded-[50%] bg-amber-500/20 border border-amber-500/20 mx-auto"></div>
<div class="w-[60px] h-[50px] -mt-0.5 mx-auto rounded-b-lg border border-amber-500/20 border-t-0 bg-gradient-to-b from-amber-500/10 to-amber-500/20 relative">
<div class="absolute bottom-0.5 left-0.5 right-0.5 rounded-b-md bg-amber-700/30 transition-all duration-[1200ms] ease-in-out group-has-[.drained]:h-0 group-has-[.drained]:opacity-0" style="height: 65%"></div>
</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">Earl Grey</p><p class="text-[9px] text-amber-600/50">Tea Leaf Reading</p></div>
<div class="px-2 py-0.5 rounded-sm text-[7px] font-bold tracking-widest text-amber-500 bg-amber-500/10 border border-amber-500/20 group-has-[.drained]:hidden">STEEP</div>
<div class="px-2 py-0.5 rounded-sm text-[7px] font-bold tracking-widest text-amber-500 bg-amber-500/10 border border-amber-500/20 hidden group-has-[.drained]:block">READ</div>
</div>
<div class="h-px bg-gradient-to-r from-transparent via-amber-500/10 to-transparent"></div>
<div class="grid grid-cols-2 gap-2">
<div class="text-center py-1.5 rounded-lg bg-amber-500/10 border border-amber-500/20"><p class="text-[10px] font-semibold text-amber-500">...</p><p class="text-[7px] mt-0.5 text-white/20">Leaves</p></div>
<div class="text-center py-1.5 rounded-lg bg-amber-500/10 border border-amber-500/20"><p class="text-[10px] font-semibold text-amber-400">What lies ahead?</p><p class="text-[7px] mt-0.5 text-white/20">Fortune</p></div>
</div>
<div class="text-center"><span class="text-[7px] font-mono text-amber-600/30">[▼ click to read leaves]</span></div>
</div>
</div>React
import React, { useState, useRef, useCallback } from 'react';
import { motion, useMotionValue, useSpring, AnimatePresence } from 'framer-motion';
export function TeaLeafReadingCard({ teaType = 'Earl Grey', width = 220 }) {
const [isHovered, setIsHovered] = useState(false);
const [drained, setDrained] = useState(false);
const [hoveredLeaf, setHoveredLeaf] = useState(null);
const ref = useRef(null);
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);
};
return (
<div onMouseEnter={() => setIsHovered(true)} onMouseLeave={() => { setIsHovered(false); x.set(0); y.set(0); }}>
<motion.div ref={ref} onMouseMove={handleMouseMove} onClick={() => setDrained(!drained)} 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, #1a1410, #120e0a)', border: '1.5px solid rgba(212,165,116,0.1)' }}
animate={{ boxShadow: isHovered ? '0 0 30px rgba(212,165,116,0.06), 0 15px 40px rgba(0,0,0,0.4)' : '0 10px 30px rgba(0,0,0,0.3)' }} transition={{ type: 'spring', stiffness: 280, damping: 20 }}>
<motion.div className="absolute z-[3] pointer-events-none" style={{ top: '12%', left: '50%', transform: 'translateX(-50%)' }} animate={drained ? { scale: [1, 1.05, 1] } : isHovered ? { y: [0, -1, 0] } : {}} transition={{ duration: drained ? 0.5 : 3, repeat: isHovered && !drained ? Infinity : 0 }}>
<div className="w-[80px] h-[6px] rounded-[50%] mx-auto" style={{ background: 'rgba(212,165,116,0.08)', border: '1px solid rgba(212,165,116,0.08)' }} />
<div className="w-[60px] h-[50px] mx-auto rounded-b-lg relative mt-[-2px]" style={{ background: 'linear-gradient(180deg, rgba(212,165,116,0.04), rgba(212,165,116,0.1))', border: '1.5px solid rgba(212,165,116,0.12)', borderTop: 'none' }}>
<motion.div className="absolute bottom-1 left-[3px] right-[3px] rounded-b-md" style={{ background: 'rgba(180,120,60,0.2)' }} animate={{ height: drained ? 0 : '65%', opacity: drained ? 0 : 1 }} transition={{ duration: 1.2, ease: 'easeInOut' }} />
</div>
</motion.div>
<div className="absolute inset-x-0 bottom-0 z-10 p-5 space-y-2" style={{ background: 'linear-gradient(0deg, rgba(0,0,0,0.6), transparent)' }}>
<div className="flex items-center justify-between">
<div><p className="text-sm font-bold" style={{ color: 'rgba(255,255,255,0.9)' }}>{teaType}</p><p className="text-[9px]" style={{ color: 'rgba(212,165,116,0.44)' }}>Tea Leaf Reading</p></div>
<motion.div className="px-2 py-0.5 rounded-sm text-[7px] font-bold tracking-widest" style={{ background: 'rgba(212,165,116,0.1)', border: '1px solid rgba(212,165,116,0.12)', color: '#d4a574' }} animate={drained ? { opacity: [0.6, 1, 0.6] } : {}} transition={{ duration: 2, repeat: Infinity }}>{drained ? 'READ' : 'STEEP'}</motion.div>
</div>
<div className="text-center"><span className="text-[7px] font-mono" style={{ color: 'rgba(212,165,116,0.2)' }}>{drained ? '[▼ pour another cup]' : '[▼ click to read leaves]'}</span></div>
</div>
</motion.div>
</motion.div>
</div>
);
}Where Tea Leaf Reading Card fits
- Fortune telling UI
- Decision making widget
- Creative project dashboard
- Mood ring alternative
Interaction states & animations
- Draining liquid
- Steam particles
- Spring-revealed leaves
- Floating tooltip
- Pulsing status indicator
Topics
- #Tea
- #Leaves
- #Fortune
- #Steam
- #Ceremonial
- #Divination
- #Interactive
Accessibility notes
Fortune reading depends on visual tea leaf patterns. Provide text alternatives for the interpretations. Steam animation may be distracting.
Browser support
- Chrome 90+
- Firefox 105+
- Safari 15+
- Edge 90+