Orchestra Card
Every element is an instrument. Musical ensemble card where hover starts the violin, stats animate piano keys, and success triggers a crescendo. Cards synchronize like a musical ensemble.
Orchestra Card
by FreeCsStyles Dev's
CardsOrchestra Performance
🌐HTML/CSS🎨Tailwind⚛️React
Embed this component
Paste this snippet into any site — the design renders in a sandboxed iframe served from /embed/orchestra-card.
<iframe src="/embed/orchestra-card" sandbox="allow-scripts" loading="lazy" title="Orchestra Card" style="border:0;width:100%;height:480px;overflow:hidden"></iframe>Implementation code
Copy the HTML and CSS for Orchestra 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="orchestra-card" onclick="cycleOrchestra(this)">
<div class="orchestra-stage-glow"></div>
<div class="orchestra-instruments">
<span>🎻</span><span>🎺</span><span>🥁</span><span>🎹</span><span>🎸</span>
</div>
<div class="orchestra-keys">
<div></div><div></div><div></div><div></div><div></div><div></div><div></div>
</div>
<div class="orchestra-content">
<div class="orchestra-header">
<div>
<div class="orchestra-title">Philharmonic</div>
<div class="orchestra-piece">Symphony No.5</div>
</div>
<div class="orchestra-status" id="orch-status">READY</div>
</div>
<div class="orchestra-divider"></div>
<div class="orchestra-grid">
<div class="orchestra-stat"><div class="orchestra-val">Maestro</div><div class="orchestra-lbl">Conductor</div></div>
<div class="orchestra-stat"><div class="orchestra-val">5</div><div class="orchestra-lbl">Instruments</div></div>
</div>
<div class="orchestra-hint">[▼ start performance]</div>
</div>
</div>
<script>
let orchStage = 0;
const statuses = ['READY', 'PLAYING', 'CRESCENDO', 'COMPLETE'];
const hints = ['[▼ start performance]', '[▼ crescendo]', '[⚡ climax!]', '[▼ encore]'];
function cycleOrchestra(el) {
orchStage = (orchStage + 1) % 4;
el.className = 'orchestra-card';
if (orchStage >= 1) el.classList.add('stage-playing');
if (orchStage >= 2) el.classList.add('stage-crescendo');
if (orchStage >= 3) el.classList.add('stage-complete');
document.getElementById('orch-status').textContent = statuses[orchStage];
el.querySelector('.orchestra-hint').textContent = hints[orchStage];
}
</script>CSS
.orchestra-card {
position: relative;
width: 220px;
min-height: 300px;
border-radius: 16px;
overflow: hidden;
background: linear-gradient(160deg, #1a1408, #120e06);
border: 1.5px solid rgba(251,191,36,0.08);
box-shadow: 0 10px 30px rgba(0,0,0,0.3);
cursor: pointer;
transition: all 0.4s ease;
}
.orchestra-card:hover {
box-shadow: 0 0 30px rgba(251,191,36,0.08), 0 15px 40px rgba(0,0,0,0.4);
}
.orchestra-stage-glow {
position: absolute;
inset: 0;
pointer-events: none;
transition: background 1s;
}
.orchestra-card:hover .orchestra-stage-glow {
background: radial-gradient(ellipse at 50% 60%, rgba(251,191,36,0.08), transparent 70%);
}
.stage-playing .orchestra-stage-glow,
.stage-crescendo .orchestra-stage-glow {
background: radial-gradient(ellipse at 50% 60%, rgba(251,191,36,0.12), transparent 70%);
}
.stage-complete .orchestra-stage-glow {
background: radial-gradient(ellipse at 50% 60%, rgba(251,191,36,0.2), transparent 70%);
}
.orchestra-instruments {
position: absolute;
top: 18%;
left: 50%;
transform: translateX(-50%);
display: flex;
gap: 12px;
pointer-events: none;
z-index: 5;
font-size: 20px;
}
.orchestra-instruments span {
animation: none;
}
.stage-playing .orchestra-instruments span,
.stage-crescendo .orchestra-instruments span {
animation: instBounce 0.6s ease-in-out infinite;
}
.stage-complete .orchestra-instruments span {
animation: instCelebrate 0.5s ease-in-out infinite;
}
@keyframes instBounce {
0%, 100% { transform: translateY(0); }
50% { transform: translateY(-6px); }
}
@keyframes instCelebrate {
0%, 100% { transform: translateY(0) scale(1); }
50% { transform: translateY(-8px) scale(1.2); }
}
.orchestra-instruments span:nth-child(2) { animation-delay: 0.08s; }
.orchestra-instruments span:nth-child(3) { animation-delay: 0.16s; }
.orchestra-instruments span:nth-child(4) { animation-delay: 0.24s; }
.orchestra-instruments span:nth-child(5) { animation-delay: 0.32s; }
.orchestra-keys {
position: absolute;
top: 38%;
left: 12%;
right: 12%;
height: 32px;
display: flex;
gap: 2px;
pointer-events: none;
z-index: 5;
}
.orchestra-keys div {
flex: 1;
border-radius: 2px;
background: rgba(255,255,255,0.04);
border: 1px solid rgba(251,191,36,0.06);
transition: all 0.15s;
}
.stage-playing .orchestra-keys div,
.stage-crescendo .orchestra-keys div {
animation: keyPress 0.15s ease-in-out infinite;
}
.stage-complete .orchestra-keys div {
background: #fbbf24;
}
@keyframes keyPress {
0%, 100% { transform: translateY(0); background: rgba(251,191,36,0.12); }
50% { transform: translateY(2px); background: rgba(251,191,36,0.25); }
}
.orchestra-keys div:nth-child(1) { animation-delay: 0s; }
.orchestra-keys div:nth-child(2) { animation-delay: 0.06s; }
.orchestra-keys div:nth-child(3) { animation-delay: 0.12s; }
.orchestra-keys div:nth-child(4) { animation-delay: 0.18s; }
.orchestra-keys div:nth-child(5) { animation-delay: 0.24s; }
.orchestra-keys div:nth-child(6) { animation-delay: 0.30s; }
.orchestra-keys div:nth-child(7) { animation-delay: 0.36s; }
.stage-crescendo .orchestra-card {
box-shadow: 0 0 40px rgba(251,191,36,0.15);
}
.orchestra-content {
position: absolute;
inset-x: 0;
bottom: 0;
z-index: 10;
padding: 20px;
display: flex;
flex-direction: column;
gap: 8px;
background: linear-gradient(0deg, rgba(0,0,0,0.5), transparent);
}
.orchestra-header { display: flex; justify-content: space-between; align-items: center; }
.orchestra-title { font-size: 14px; font-weight: 700; color: rgba(255,255,255,0.9); }
.orchestra-piece { font-size: 9px; color: rgba(251,191,36,0.44); }
.orchestra-status {
padding: 2px 8px; border-radius: 2px; font-size: 7px; font-weight: 700; letter-spacing: 0.1em;
color: #fbbf24; background: rgba(251,191,36,0.1); border: 1px solid rgba(251,191,36,0.12);
}
.stage-playing .orchestra-status, .stage-crescendo .orchestra-status {
animation: pulse 1s ease-in-out infinite;
}
.orchestra-divider { height: 1px; background: linear-gradient(90deg, transparent, rgba(251,191,36,0.08), transparent); }
.orchestra-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.orchestra-stat { text-align: center; padding: 6px 4px; border-radius: 8px; background: rgba(251,191,36,0.02); border: 1px solid rgba(251,191,36,0.06); }
.orchestra-val { font-size: 10px; font-weight: 600; color: #fbbf24; }
.orchestra-lbl { font-size: 7px; margin-top: 2px; color: rgba(255,255,255,0.2); }
.orchestra-hint { text-align: center; font-size: 7px; font-family: monospace; color: rgba(251,191,36,0.2); }
@keyframes pulse {
0%, 100% { opacity: 0.6; }
50% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
.orchestra-card { transition: none; }
.orchestra-instruments span { animation: none !important; }
.orchestra-keys div { animation: none !important; transition: none; }
}Tailwind CSS
<div class="group relative w-[220px] min-h-[300px] rounded-2xl overflow-hidden border border-amber-400/20 shadow-lg group-hover:shadow-[0_0_30px_rgba(251,191,36,0.08),0_15px_40px_rgba(0,0,0,0.4)] bg-gradient-to-br from-[#1a1408] to-[#120e06] cursor-pointer">
<div class="absolute top-[18%] left-1/2 -translate-x-1/2 flex gap-3 pointer-events-none z-5 group-hover:[&>span]:animate-bounce">
<span class="text-lg [animation-delay:0ms]">🎻</span><span class="text-lg [animation-delay:80ms]">🎺</span><span class="text-lg [animation-delay:160ms]">🥁</span><span class="text-lg [animation-delay:240ms]">🎹</span><span class="text-lg [animation-delay:320ms]">🎸</span>
</div>
<div class="absolute top-[38%] left-[12%] right-[12%] h-8 flex gap-[2px] pointer-events-none z-5">
{[1,2,3,4,5,6,7].map((_,i) => <div key={i} class="flex-1 rounded-sm bg-white/10 border border-amber-400/20 group-hover:animate-[keyPress_0.15s_ease-in-out_infinite]" style={{animationDelay:`${i*60}ms`}}></div>)}
</div>
<div class="absolute inset-x-0 bottom-0 z-10 p-5 space-y-2 bg-gradient-to-t from-black/50 to-transparent">
<div class="flex items-center justify-between">
<div><p class="text-sm font-bold text-white/90">Philharmonic</p><p class="text-[9px] text-amber-400/50">Symphony No.5</p></div>
<div class="px-2 py-0.5 rounded-sm text-[7px] font-bold tracking-widest text-amber-400 bg-amber-500/10 border border-amber-500/20">READY</div>
</div>
<div class="h-px bg-gradient-to-r from-transparent via-amber-400/20 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-400">Maestro</p><p class="text-[7px] mt-0.5 text-white/20">Conductor</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-500">5</p><p class="text-[7px] mt-0.5 text-white/20">Instruments</p></div>
</div>
<div class="text-center"><span class="text-[7px] font-mono text-amber-400/30">[▼ start performance]</span></div>
</div>
</div>React
import React, { useState, useRef, useCallback } from 'react';
import { motion, useMotionValue, useSpring } from 'framer-motion';
export function OrchestraCard() {
const [isHovered, setIsHovered] = useState(false);
const [status, setStatus] = useState('ready');
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();
const cx = rect.left + rect.width / 2;
const cy = rect.top + rect.height / 2;
x.set(-((e.clientX - cx) / (rect.width / 2)) * 6);
y.set(((e.clientY - cy) / (rect.height / 2)) * 6);
};
const handleClick = useCallback(() => {
if (status === 'complete') { setStatus('ready'); return; }
if (status === 'ready') setStatus('playing');
else if (status === 'playing') setStatus('crescendo');
else if (status === 'crescendo') setStatus('complete');
}, [status]);
const instruments = ['🎻', '🎺', '🥁', '🎹', '🎸'];
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', cursor: 'pointer' }}>
<motion.div className="relative overflow-hidden rounded-2xl" style={{ width: 220, minHeight: 300, background: 'linear-gradient(160deg, #1a1408, #120e06)', border: '1.5px solid rgba(251,191,36,0.08)' }}
animate={{ boxShadow: isHovered ? '0 0 30px rgba(251,191,36,0.08), 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 }}>
{instruments.map((inst, i) => (
<motion.div key={i} className="absolute text-lg" style={{ top: '18%', left: `${26 + i * 14}%` }}
animate={{ y: (status === 'playing' || status === 'crescendo') ? [0, -4 - i, 0] : status === 'complete' ? [0, -6, 0, -4, 0] : 0 }}
transition={{ duration: status === 'crescendo' ? 0.3 : 0.6 + i * 0.1, repeat: status === 'ready' ? 0 : Infinity, ease: 'easeInOut', delay: i * 0.08 }}>{inst}</motion.div>
))}
<div className="absolute top-[38%] left-[12%] right-[12%] h-8 flex gap-[2px] pointer-events-none z-5">
{[1,2,3,4,5,6,7].map((_, i) => (
<motion.div key={i} className="flex-1 rounded-sm" style={{ background: status === 'complete' ? '#fbbf24' : `rgba(255,255,255,${0.06 + (i % 2 === 0 ? 0.04 : 0)})`, border: '1px solid rgba(251,191,36,0.06)' }}
animate={status === 'playing' || status === 'crescendo' ? { y: [0, 1, 0], background: ['rgba(251,191,36,0.12)', 'rgba(251,191,36,0.25)', 'rgba(251,191,36,0.12)'] } : status === 'complete' ? { background: ['rgba(251,191,36,0.25)', 'rgba(251,191,36,0.4)', 'rgba(251,191,36,0.25)'] } : {}}
transition={{ duration: 0.15, repeat: status === 'ready' ? 0 : Infinity, delay: i * 0.06 }} />
))}
</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.5), transparent)' }}>
<div className="flex items-center justify-between">
<div><p className="text-sm font-bold text-white/90">Philharmonic</p><p className="text-[9px]" style={{ color: 'rgba(251,191,36,0.44)' }}>Symphony No.5</p></div>
<motion.div className="px-2 py-0.5 rounded-sm text-[7px] font-bold tracking-widest" style={{ background: 'rgba(251,191,36,0.1)', border: '1px solid rgba(251,191,36,0.12)', color: '#fbbf24' }}
animate={status !== 'ready' ? { opacity: [0.6, 1, 0.6] } : {}} transition={{ duration: status === 'crescendo' ? 0.3 : 1, repeat: status === 'ready' ? 0 : Infinity }}>{status.toUpperCase()}</motion.div>
</div>
<div className="h-px" style={{ background: 'linear-gradient(90deg, transparent, rgba(251,191,36,0.08), transparent)' }} />
<div className="grid grid-cols-2 gap-2">
<div className="text-center py-1.5 rounded-lg" style={{ background: 'rgba(251,191,36,0.02)', border: '1px solid rgba(251,191,36,0.06)' }}>
<p className="text-[10px] font-semibold" style={{ color: '#fbbf24' }}>Maestro</p><p className="text-[7px] mt-0.5 text-white/20">Conductor</p>
</div>
<div className="text-center py-1.5 rounded-lg" style={{ background: 'rgba(251,191,36,0.02)', border: '1px solid rgba(251,191,36,0.06)' }}>
<p className="text-[10px] font-semibold" style={{ color: '#d97706' }}>5</p><p className="text-[7px] mt-0.5 text-white/20">Instruments</p>
</div>
</div>
<motion.div className="text-center" animate={isHovered ? { y: [0, -1, 0] } : {}} transition={{ duration: 1.5, repeat: isHovered ? Infinity : 0 }}>
<span className="text-[7px] font-mono" style={{ color: 'rgba(251,191,36,0.2)' }}>{status === 'complete' ? '[▼ encore]' : status === 'crescendo' ? '[⚡ climax!]' : status === 'playing' ? '[▼ crescendo]' : '[▼ start performance]'}</span>
</motion.div>
</div>
</motion.div>
</motion.div>
</div>
);
}Interaction states & animations
- Hover