Mechanical Clockwork Card
A steampunk-inspired card driven by gears and machinery. Features brass gears, metal plates, rivets, and engraved details. Rotating gears, steam bursts, and pressure gauge animations bring this industrial design to life.
by FreeCsStyles Dev's
Embed this component
Paste this snippet into any site — the design renders in a sandboxed iframe served from /embed/mechanical-clockwork-card.
<iframe src="/embed/mechanical-clockwork-card" sandbox="allow-scripts" loading="lazy" title="Mechanical Clockwork Card" style="border:0;width:100%;height:480px;overflow:hidden"></iframe>Implementation code
Copy the HTML and CSS for Mechanical Clockwork 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="clockwork-card">
<div class="clockwork-rivets">
<div class="rivet" style="top: 8px; left: 8px;"></div>
<div class="rivet" style="top: 8px; right: 8px;"></div>
<div class="rivet" style="bottom: 8px; left: 8px;"></div>
<div class="rivet" style="bottom: 8px; right: 8px;"></div>
</div>
<div class="clockwork-gears">
<div class="gear" style="top: 8%; left: 75%; width: 16px; height: 16px;"></div>
<div class="gear" style="top: 20%; left: 12%; width: 22px; height: 22px;"></div>
<div class="gear" style="top: 65%; left: 80%; width: 12px; height: 12px;"></div>
<div class="gear" style="top: 55%; left: 10%; width: 18px; height: 18px;"></div>
<div class="gear" style="top: 78%; left: 45%; width: 10px; height: 10px;"></div>
</div>
<div class="clockwork-content">
<div class="cw-header">
<span class="cw-serial">#MECH-4X9</span>
<span class="cw-status">OPERATIONAL</span>
</div>
<div class="cw-title">CLOCKWORK ENGINE</div>
<div class="cw-divider"></div>
<div class="cw-gauges">
<div class="cw-gauge">
<div class="cw-g-value">2,400</div>
<div class="cw-g-label">RPM</div>
</div>
<div class="cw-gauge">
<div class="cw-g-value">87 PSI</div>
<div class="cw-g-label">PRESSURE</div>
</div>
<div class="cw-gauge">
<div class="cw-g-value">142°C</div>
<div class="cw-g-label">TEMP</div>
</div>
</div>
<div class="cw-efficiency">
<div class="cw-ef-header">
<span>EFFICIENCY</span>
<span>76%</span>
</div>
<div class="cw-ef-track">
<div class="cw-ef-fill" style="width: 76%"></div>
</div>
</div>
</div>
</div>CSS
.clockwork-card {
position: relative;
width: 210px;
min-height: 290px;
border-radius: 12px;
overflow: hidden;
background: linear-gradient(145deg, #1a1612, #12100e);
border: 1.5px solid rgba(217,119,6,0.25);
box-shadow: 0 10px 30px rgba(0,0,0,0.4);
transition: all 0.4s ease;
}
.clockwork-card:hover {
transform: translateY(-6px);
box-shadow: 0 25px 50px rgba(0,0,0,0.6), 0 0 20px rgba(217,119,6,0.1);
}
.clockwork-rivets {
position: absolute;
inset: 0;
pointer-events: none;
z-index: 20;
}
.rivet {
position: absolute;
width: 8px;
height: 8px;
border-radius: 50%;
background: radial-gradient(circle at 35% 35%, rgba(217,119,6,0.5), rgba(217,119,6,0.2));
box-shadow: inset 0 1px 1px rgba(217,119,6,0.3);
}
.clockwork-gears {
position: absolute;
inset: 0;
pointer-events: none;
z-index: 10;
}
.gear {
position: absolute;
border-radius: 50%;
border: 1.5px solid rgba(217,119,6,0.2);
opacity: 0.25;
transition: all 0.3s ease;
}
.clockwork-card:hover .gear {
opacity: 0.5;
border-color: rgba(217,119,6,0.4);
animation: rotate-gear 4s linear infinite;
}
.clockwork-card:hover .gear:nth-child(2) { animation-duration: 3s; animation-direction: reverse; }
.clockwork-card:hover .gear:nth-child(3) { animation-duration: 5s; }
.clockwork-card:hover .gear:nth-child(4) { animation-duration: 3.5s; animation-direction: reverse; }
@keyframes rotate-gear {
to { transform: rotate(360deg); }
}
.clockwork-content {
position: relative;
z-index: 20;
padding: 20px;
display: flex;
flex-direction: column;
gap: 12px;
}
.cw-header {
display: flex;
justify-content: space-between;
align-items: center;
}
.cw-serial {
font-size: 9px;
font-family: monospace;
color: rgba(217,119,6,0.5);
}
.cw-status {
padding: 2px 8px;
border-radius: 2px;
font-size: 7px;
font-weight: 700;
letter-spacing: 1px;
color: #d97706;
background: rgba(217,119,6,0.1);
border: 1px solid rgba(217,119,6,0.2);
}
.cw-title {
font-size: 14px;
font-weight: 900;
letter-spacing: 2px;
color: rgba(255,255,255,0.85);
}
.cw-divider {
height: 1px;
background: linear-gradient(90deg, transparent, rgba(217,119,6,0.3), transparent);
}
.cw-gauges {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 8px;
}
.cw-gauge {
text-align: center;
padding: 8px 4px;
border-radius: 4px;
background: rgba(217,119,6,0.04);
border: 1px solid rgba(217,119,6,0.08);
}
.cw-g-value {
font-size: 8px;
font-weight: 700;
font-family: monospace;
color: #d97706;
}
.cw-g-label {
font-size: 6px;
font-family: monospace;
letter-spacing: 1px;
margin-top: 2px;
color: rgba(255,255,255,0.25);
}
.cw-efficiency {}
.cw-ef-header {
display: flex;
justify-content: space-between;
font-size: 7px;
font-family: monospace;
color: rgba(255,255,255,0.3);
margin-bottom: 4px;
}
.cw-ef-track {
height: 8px;
border-radius: 2px;
background: rgba(255,255,255,0.05);
overflow: hidden;
}
.cw-ef-fill {
height: 100%;
border-radius: 2px;
background: linear-gradient(90deg, rgba(217,119,6,0.3), #d97706);
transition: width 1.2s ease-out;
}
@media (prefers-reduced-motion: reduce) {
.clockwork-card { transition: none; }
.clockwork-card:hover { transform: none; }
.gear { animation: none !important; }
}Tailwind CSS
<div class="group relative w-[210px] min-h-[290px] rounded-xl overflow-hidden border border-amber-600/25 shadow-lg transition-all duration-500 group-hover:-translate-y-1.5 group-hover:shadow-[0_25px_50px_rgba(0,0,0,0.6),0_0_20px_rgba(217,119,6,0.1)] bg-gradient-to-br from-[#1a1612] to-[#12100e]">
<div class="absolute z-20 pointer-events-none">
<div class="absolute w-2 h-2 rounded-full" style="top: 8px; left: 8px; background: radial-gradient(circle at 35% 35%, rgba(217,119,6,0.5), rgba(217,119,6,0.2));"></div>
<div class="absolute w-2 h-2 rounded-full" style="top: 8px; right: 8px; background: radial-gradient(circle at 35% 35%, rgba(217,119,6,0.5), rgba(217,119,6,0.2));"></div>
<div class="absolute w-2 h-2 rounded-full" style="bottom: 8px; left: 8px; background: radial-gradient(circle at 35% 35%, rgba(217,119,6,0.5), rgba(217,119,6,0.2));"></div>
<div class="absolute w-2 h-2 rounded-full" style="bottom: 8px; right: 8px; background: radial-gradient(circle at 35% 35%, rgba(217,119,6,0.5), rgba(217,119,6,0.2));"></div>
</div>
<div class="absolute z-10" style="background-image: repeating-linear-gradient(90deg, transparent, transparent 20px, rgba(217,119,6,0.02) 20px, rgba(217,119,6,0.02) 21px), repeating-linear-gradient(0deg, transparent, transparent 20px, rgba(217,119,6,0.02) 20px, rgba(217,119,6,0.02) 21px);"></div>
<div class="relative z-20 p-5 space-y-3">
<div class="flex items-center justify-between">
<span class="text-[9px] font-mono text-amber-600/50">#MECH-4X9</span>
<span class="px-2 py-0.5 rounded-sm text-[7px] font-bold tracking-widest text-amber-600 bg-amber-500/10 border border-amber-500/20">OPERATIONAL</span>
</div>
<p class="text-sm font-black tracking-widest text-white/85">CLOCKWORK ENGINE</p>
<div class="h-px bg-gradient-to-r from-transparent via-amber-500/30 to-transparent"></div>
<div class="grid grid-cols-3 gap-2">
<div class="text-center py-2 px-1 rounded bg-amber-500/10 border border-amber-500/20">
<p class="text-[8px] font-bold font-mono text-amber-600">2,400</p>
<p class="text-[6px] mt-0.5 font-mono tracking-wider text-white/30">RPM</p>
</div>
<div class="text-center py-2 px-1 rounded bg-amber-500/10 border border-amber-500/20">
<p class="text-[8px] font-bold font-mono text-amber-600">87 PSI</p>
<p class="text-[6px] mt-0.5 font-mono tracking-wider text-white/30">PRESSURE</p>
</div>
<div class="text-center py-2 px-1 rounded bg-amber-500/10 border border-amber-500/20">
<p class="text-[8px] font-bold font-mono text-amber-600">142°C</p>
<p class="text-[6px] mt-0.5 font-mono tracking-wider text-white/30">TEMP</p>
</div>
</div>
<div>
<div class="flex justify-between mb-1"><span class="text-[7px] font-mono text-white/30">EFFICIENCY</span><span class="text-[7px] font-bold font-mono text-amber-600">76%</span></div>
<div class="h-2 rounded-sm overflow-hidden bg-white/5"><div class="h-full rounded-sm bg-gradient-to-r from-amber-500/30 to-amber-500 transition-all duration-1000" style="width: 76%;"></div></div>
</div>
</div>
</div>React
import React, { useRef, useState } from 'react';
import { motion, useMotionValue, useSpring } from 'framer-motion';
export function MechanicalClockworkCard() {
const ref = useRef<HTMLDivElement>(null);
const [isHovered, setIsHovered] = useState(false);
const x = useMotionValue(0);
const y = useMotionValue(0);
const rotateX = useSpring(y, { damping: 20, stiffness: 180 });
const rotateY = useSpring(x, { damping: 20, stiffness: 180 });
const handleMouseMove = (e: React.MouseEvent) => {
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)) * 10);
y.set(((e.clientY - cy) / (rect.height / 2)) * 10);
};
const gearSvg = (size: number, opacity: number) => (
<svg width={size} height={size} viewBox="0 0 24 24" fill="none" stroke="#d97706" strokeWidth="1.5" opacity={opacity}>
<circle cx="12" cy="12" r="4" />
<path d="M12 2v3M12 19v3M2 12h3M19 12h3M4.93 4.93l2.12 2.12M16.95 16.95l2.12 2.12M4.93 19.07l2.12-2.12M16.95 7.05l2.12-2.12" />
</svg>
);
return (
<div onMouseEnter={() => setIsHovered(true)} onMouseLeave={() => { setIsHovered(false); x.set(0); y.set(0); }}>
{isHovered && [...Array(3)].map((_, i) => (
<motion.div key={i} className="absolute w-8 h-8 rounded-full pointer-events-none z-30"
style={{ background: 'radial-gradient(circle, rgba(217,119,6,0.08), transparent)', filter: 'blur(4px)', top: [60, 70, 80][i] + '%', left: [20, 60, 85][i] + '%' }}
initial={{ opacity: 0, scale: 0.5, y: 0 }}
animate={{ opacity: [0, 0.4, 0], scale: [0.5, 1.5, 2], y: [-20, -40] }}
transition={{ duration: 2 + i * 0.5, repeat: Infinity, delay: i * 0.8, ease: 'easeOut' }} />
))}
<motion.div ref={ref} onMouseMove={handleMouseMove} style={{ rotateX, rotateY, transformStyle: 'preserve-3d' }}>
<motion.div className="relative overflow-hidden"
style={{
width: 210, minHeight: 290, borderRadius: 12,
border: '1.5px solid rgba(217,119,6,0.25)',
background: 'linear-gradient(145deg, #1a1612, #12100e)',
boxShadow: isHovered ? '0 25px 50px rgba(0,0,0,0.6), 0 0 20px rgba(217,119,6,0.1)' : '0 10px 30px rgba(0,0,0,0.4)',
}}
animate={{ y: isHovered ? -6 : 0 }}
transition={{ type: 'spring', stiffness: 280, damping: 20 }}>
{[[8,8],[8,8],[8,8],[8,8]].map((_, i) => (
<div key={i} className="absolute w-2 h-2 rounded-full z-20 pointer-events-none"
style={{
[i < 2 ? (i === 0 ? 'top' : 'top') : 'bottom']: 8,
[i % 2 === 0 ? 'left' : 'right']: 8,
background: 'radial-gradient(circle at 35% 35%, rgba(217,119,6,0.5), rgba(217,119,6,0.2))',
boxShadow: 'inset 0 1px 1px rgba(217,119,6,0.3)',
}} />
))}
{[16, 22, 12, 18, 10].map((size, i) => (
<motion.div key={i} className="absolute pointer-events-none z-10"
style={{ top: [8, 20, 62, 55, 76][i] + '%', left: [75, 12, 80, 10, 45][i] + '%' }}
animate={{ rotate: isHovered ? 360 : 0 }}
transition={{ duration: 4 + i * 0.5, repeat: isHovered ? Infinity : 0, ease: 'linear' }}>
{gearSvg(size, isHovered ? 0.5 : 0.2)}
</motion.div>
))}
<div className="relative z-20 p-5 space-y-3">
<div className="flex items-center justify-between">
<span className="text-[9px] font-mono text-amber-600/50">#MECH-4X9</span>
<motion.span className="px-2 py-0.5 rounded-sm text-[7px] font-bold tracking-widest text-amber-600" style={{ background: 'rgba(217,119,6,0.1)', border: '1px solid rgba(217,119,6,0.2)' }} animate={isHovered ? { opacity: [0.7, 1, 0.7] } : {}} transition={{ duration: 1.5, repeat: isHovered ? Infinity : 0 }}>OPERATIONAL</motion.span>
</div>
<p className="text-sm font-black tracking-widest text-white/85">CLOCKWORK ENGINE</p>
<div className="h-px bg-gradient-to-r from-transparent via-amber-500/30 to-transparent" />
<div className="grid grid-cols-3 gap-2">
{[{ label: 'RPM', value: '2,400' }, { label: 'PRESSURE', value: '87 PSI' }, { label: 'TEMP', value: '142°C' }].map((g, i) => (
<motion.div key={g.label} className="text-center py-2 px-1 rounded" style={{ background: 'rgba(217,119,6,0.04)', border: '1px solid rgba(217,119,6,0.08)' }}
animate={isHovered ? { scale: [1, 1.03, 1] } : {}}
transition={{ duration: 1, repeat: isHovered ? Infinity : 0, delay: i * 0.15 }}>
<motion.p className="text-[8px] font-bold font-mono text-amber-600" animate={isHovered ? { opacity: [0.6, 1, 0.6] } : {}} transition={{ duration: 0.8, repeat: isHovered ? Infinity : 0, delay: i * 0.1 }}>{g.value}</motion.p>
<p className="text-[6px] mt-0.5 font-mono tracking-wider text-white/30">{g.label}</p>
</motion.div>
))}
</div>
<div>
<div className="flex justify-between mb-1"><span className="text-[7px] font-mono text-white/30">EFFICIENCY</span><motion.span className="text-[7px] font-bold font-mono text-amber-600" animate={isHovered ? { opacity: [0.5, 1, 0.5] } : {}} transition={{ duration: 1, repeat: isHovered ? Infinity : 0 }}>76%</motion.span></div>
<div className="h-2 rounded-sm overflow-hidden bg-white/5"><motion.div className="h-full rounded-sm" style={{ background: 'linear-gradient(90deg, rgba(217,119,6,0.3), #d97706)' }} initial={{ width: '0%' }} animate={{ width: '76%' }} transition={{ duration: 1.2, ease: 'easeOut' }} /></div>
</div>
</div>
</motion.div>
</motion.div>
</div>
);
}Where Mechanical Clockwork Card fits
- Engineering
- Manufacturing
- Developer Tools
- Industrial Dashboards
- Steampunk Games
- Machine Learning
Interaction states & animations
- Clock gears
- Steam bursts
- Lever movement
- Mechanical assembly
Topics
- #mechanical
- #steampunk
- #gears
- #industrial
- #brass
- #clockwork
- #engineering
- #vintage-tech
- #machinery
- #metal
Accessibility notes
Mechanical animations should support prefers-reduced-motion. Ensure text contrast on dark metal backgrounds. Gear and steam effects should not cause distraction. Provide clear focus indicators.
Browser support
- Chrome 76+
- Firefox 90+
- Safari 13+
- Edge 79+