Squeezable Clay Card
A soft, matte clay block with rounded inflated edges that responds to touch. Hover presses into the clay leaving a temporary indentation that slowly rebounds. Clicking pinches the card, squeezing it into a different shape to reveal a new view. The surface features subtle fingerprints and tool marks for authenticity, with color bleeding at pressure points like oil pastels.
by FreeCsStyles Dev's
Embed this component
Paste this snippet into any site — the design renders in a sandboxed iframe served from /embed/squeezable-clay-card.
<iframe src="/embed/squeezable-clay-card" sandbox="allow-scripts" loading="lazy" title="Squeezable Clay Card" style="border:0;width:100%;height:480px;overflow:hidden"></iframe>Implementation code
Copy the HTML and CSS for Squeezable Clay 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="squeezable-card">
<div class="squeezable-surface">
<div class="squeezable-indent"></div>
<div class="squeezable-marks"></div>
<div class="squeezable-content">
<div class="squeezable-header">
<div><div class="squeezable-title">Soft Vessel</div><div class="squeezable-sub">Kiln</div></div>
<div class="squeezable-status">AT REST</div>
</div>
<div class="squeezable-grid">
<div class="squeezable-stat"><div class="squeezable-stat-val">Pliable</div><div class="squeezable-stat-lbl">State</div></div>
<div class="squeezable-stat"><div class="squeezable-stat-val">0</div><div class="squeezable-stat-lbl">Pinches</div></div>
</div>
<div class="squeezable-hint">[▼ squeeze to pinch]</div>
</div>
</div>
</div>CSS
.squeezable-card { position: relative; width: 220px; min-height: 300px; border-radius: 16px; overflow: hidden; background: linear-gradient(160deg, #2d1a12, #1a0f0a); border: 1.5px solid rgba(196,113,75,0.12); box-shadow: 0 10px 30px rgba(0,0,0,0.3); cursor: pointer; transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); }
.squeezable-card:hover { box-shadow: 0 0 30px rgba(168,93,58,0.25), 0 15px 40px rgba(0,0,0,0.5); }
.squeezable-card:active { border-radius: 28px 16px 28px 16px; }
.squeezable-surface { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 30%, rgba(212,135,102,0.18), rgba(168,93,58,0.5)); }
.squeezable-indent { position: absolute; width: 30px; height: 30px; border-radius: 50%; background: radial-gradient(circle, rgba(168,93,58,0.37), rgba(168,93,58,0.12), transparent); box-shadow: inset 0 2px 8px rgba(168,93,58,0.25); pointer-events: none; }
.squeezable-marks { position: absolute; inset: 0; background-image: radial-gradient(circle at 20% 40%, rgba(212,135,102,0.06) 1px, transparent 1px); background-size: 12px 12px; pointer-events: none; }
.squeezable-content { position: absolute; inset-x: 0; bottom: 0; z-index: 10; padding: 20px; background: linear-gradient(0deg, rgba(0,0,0,0.6), transparent); }
.squeezable-header { display: flex; justify-content: space-between; align-items: center; }
.squeezable-title { font-size: 14px; font-weight: 700; color: rgba(255,255,255,0.9); }
.squeezable-sub { font-size: 9px; color: rgba(232,168,124,0.37); }
.squeezable-status { padding: 2px 8px; border-radius: 2px; font-size: 7px; font-weight: 700; letter-spacing: 0.1em; color: rgba(232,168,124,0.6); background: rgba(196,113,75,0.08); border: 1px solid rgba(196,113,75,0.14); }
.squeezable-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.squeezable-stat { text-align: center; padding: 6px 4px; border-radius: 8px; background: rgba(196,113,75,0.05); border: 1px solid rgba(196,113,75,0.07); }
.squeezable-stat-val { font-size: 10px; font-weight: 600; color: rgba(232,168,124,0.6); }
.squeezable-stat-lbl { font-size: 7px; margin-top: 2px; color: rgba(255,255,255,0.2); }
.squeezable-hint { text-align: center; font-size: 7px; font-family: monospace; color: rgba(196,113,75,0.18); margin-top: 8px; }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(168,93,58,0.25),0_15px_40px_rgba(0,0,0,0.5)] bg-gradient-to-b from-[#2d1a12] to-[#1a0f0a] cursor-pointer active:rounded-[28px_16px_28px_16px]">
<div class="absolute inset-0 bg-gradient-radial from-amber-600/20 to-amber-900/50"></div>
<div class="absolute inset-0 bg-[radial-gradient(circle_at_20%_40%,rgba(212,135,102,0.06)_1px,transparent_1px)] bg-[length:12px_12px] pointer-events-none"></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">Soft Vessel</p><p class="text-[9px] text-amber-300/40">Kiln</p></div>
<div class="px-2 py-0.5 rounded-sm text-[7px] font-bold tracking-widest text-amber-300/60 bg-amber-700/10 border border-amber-700/20">AT REST</div>
</div>
<div class="h-px bg-gradient-to-r from-transparent via-amber-700/10 to-transparent"></div>
<div class="grid grid-cols-2 gap-2">
<div class="text-center py-1.5 rounded-lg bg-amber-700/10 border border-amber-700/20"><p class="text-[10px] font-semibold text-amber-300/60">Pliable</p><p class="text-[7px] mt-0.5 text-white/20">State</p></div>
<div class="text-center py-1.5 rounded-lg bg-amber-700/10 border border-amber-700/20"><p class="text-[10px] font-semibold text-amber-300/60">0</p><p class="text-[7px] mt-0.5 text-white/20">Pinches</p></div>
</div>
<div class="text-center"><span class="text-[7px] font-mono text-amber-700/30">[▼ squeeze to pinch]</span></div>
</div>
</div>React
import React, { useState, useRef, useCallback } from 'react';
import { motion, useMotionValue, useSpring } from 'framer-motion';
export function SqueezableClayCard({ sculptureName = 'Soft Vessel', artist = 'Kiln', width = 220 }) {
const ref = useRef(null);
const [isHovered, setIsHovered] = useState(false);
const [isPinched, setIsPinched] = useState(false);
const [indentPos, setIndentPos] = useState({ x: 50, y: 50 });
const [indentDepth, setIndentDepth] = useState(0);
const colors = { base: '#c4714b', light: '#d48766', dark: '#a85d3a', accent: '#e8a87c' };
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);
if (isHovered) {
setIndentPos({ x: ((e.clientX - rect.left) / rect.width) * 100, y: ((e.clientY - rect.top) / rect.height) * 100 });
setIndentDepth(isPinched ? 60 : 30);
}
};
return (
<div onMouseEnter={() => setIsHovered(true)} onMouseLeave={() => { setIsHovered(false); x.set(0); y.set(0); setIndentDepth(0); }}>
<motion.div ref={ref} onMouseMove={handleMouseMove} onClick={() => setIsPinched((p) => !p)} 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, #2d1a12, #1a0f0a)', border: '1.5px solid rgba(196,113,75,0.12)' }}
animate={{ boxShadow: isHovered ? '0 0 30px rgba(168,93,58,0.25), 0 15px 40px rgba(0,0,0,0.5)' : '0 10px 30px rgba(0,0,0,0.3)', borderRadius: isPinched ? '28px 16px 28px 16px' : '16px' }} transition={{ type: 'spring', stiffness: 260, damping: 20 }}>
{indentDepth > 0 && (
<motion.div className="absolute z-[2] pointer-events-none" style={{ left: `${indentPos.x}%`, top: `${indentPos.y}%`, width: isPinched ? '50px' : '30px', height: isPinched ? '50px' : '30px', borderRadius: '50%', transform: 'translate(-50%,-50%)', background: 'radial-gradient(circle, rgba(168,93,58,0.37), rgba(168,93,58,0.12), transparent)', boxShadow: 'inset 0 2px 8px rgba(168,93,58,0.25)' }} />
)}
<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)' }}>{sculptureName}</p><p className="text-[9px]" style={{ color: 'rgba(232,168,124,0.37)' }}>{artist}</p></div>
<motion.div className="px-2 py-0.5 rounded-sm text-[7px] font-bold tracking-widest" style={{ background: 'rgba(196,113,75,0.08)', border: '1px solid rgba(196,113,75,0.14)', color: 'rgba(232,168,124,0.6)' }}>{isPinched ? 'PINCHED' : isHovered ? 'SQUEEZE' : 'AT REST'}</motion.div>
</div>
<div className="text-center"><span className="text-[7px] font-mono" style={{ color: 'rgba(196,113,75,0.18)' }}>{isPinched ? '[▼ click to rebound]' : '[▼ squeeze to pinch]'}</span></div>
</div>
</motion.div>
</motion.div>
</div>
);
}Where Squeezable Clay Card fits
- Tactile UI feedback
- Stress-relief interfaces
- Playful product showcases
- Creative portfolios
- Experimental navigation
Interaction states & animations
- Indentation
- Rebound
- Pinch deformation
- Color bleed
- Tool mark reveal
Topics
- #claymorphism
- #squeezable
- #tactile
- #soft-ui
- #indentation
- #pinch
- #matte
- #sculptural
Accessibility notes
The indentation and pinch interactions are visual only. Provide alternative text descriptions for the squeezed view state. The fingerprints and tool marks are decorative.
Browser support
- Chrome 90+
- Firefox 105+
- Safari 15+
- Edge 90+