StealThis .dev

Morphing Blobs

Three approaches to organic shape animation: CSS border-radius, SVG path morphing, and Canvas bezier curves.

Open in Lab
css-border-radiussvg-pathcanvas-bezier
Targets: JS HTML

Code

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root { --bg: #070a12; --text: #f0f4fb; --muted: #8a95a8; --accent: #86e8ff; --border: #263249; }

body { background: var(--bg); color: var(--text); font-family: 'Inter', 'SF Pro Display', system-ui, sans-serif; min-height: 100vh; }

.header { text-align: center; padding: 5rem 2rem 2rem; }
.eyebrow { display: inline-block; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.18em; color: var(--accent); margin-bottom: 1rem; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 700; letter-spacing: -0.02em; }
.subtitle { font-size: clamp(0.9rem, 2vw, 1.05rem); color: var(--muted); max-width: 520px; margin: 0.75rem auto 0; line-height: 1.6; }

.demos { max-width: 900px; margin: 0 auto; padding: 2rem 2rem 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }

.demo-block {
  background: rgba(18,26,43,0.4); border: 1px solid var(--border); border-radius: 18px;
  padding: 2rem; text-align: center;
}
.demo-block h2 { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.4rem; }
.demo-desc { font-size: 0.8rem; color: var(--muted); line-height: 1.5; margin-bottom: 1.5rem; }

.blob-stage {
  display: flex; align-items: center; justify-content: center;
  height: 220px; position: relative;
}

/* CSS Blobs */
.css-blob {
  position: absolute;
  width: 140px; height: 140px;
  animation: morph 8s ease-in-out infinite;
  filter: blur(0px);
}

.blob-1 {
  background: linear-gradient(135deg, #86e8ff, #3d9eff);
  opacity: 0.7;
  animation-delay: 0s;
}
.blob-2 {
  background: linear-gradient(135deg, #ae52ff, #7c2aff);
  opacity: 0.5;
  animation-delay: -2.5s;
  width: 120px; height: 120px;
}
.blob-3 {
  background: linear-gradient(135deg, #ff40d6, #ff6b9d);
  opacity: 0.4;
  animation-delay: -5s;
  width: 100px; height: 100px;
}

@keyframes morph {
  0%, 100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; transform: rotate(0deg) scale(1); }
  25% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; transform: rotate(90deg) scale(1.05); }
  50% { border-radius: 50% 60% 30% 60% / 30% 50% 70% 60%; transform: rotate(180deg) scale(0.95); }
  75% { border-radius: 60% 30% 60% 40% / 70% 40% 50% 60%; transform: rotate(270deg) scale(1.02); }
}

.reduced-motion .css-blob { animation: none; border-radius: 50%; }

/* SVG Blob */
.svg-blob { width: 180px; height: 180px; }

/* Canvas Blob */
#canvas-blob { width: 220px; height: 220px; }

.footer { text-align: center; padding: 2.5rem 2rem 4rem; }
.btn-back {
  display: inline-block; padding: 0.7rem 2rem; border-radius: 999px;
  border: 1px solid rgba(134,232,255,0.3); color: var(--accent); text-decoration: none;
  font: 600 0.85rem/1 'Inter', system-ui, sans-serif; transition: all 0.25s;
}
.btn-back:hover { background: rgba(134,232,255,0.08); border-color: var(--accent); }

@media (max-width: 640px) {
  .demos { grid-template-columns: 1fr; padding: 1rem 1rem 0; }
}

Morphing Blobs

Three approaches to organic shape animation: CSS border-radius, SVG path morphing, and Canvas bezier curves.

Source

  • Repository: libs-genclaude
  • Original demo id: 20-morphing-blobs

Notes

Three approaches to organic shape animation: CSS border-radius, SVG path morphing, and Canvas bezier curves.