Skip to content
Founding Lifetime: every Pro skillfirst 100 members · $169 onceUpgrade
Lookbk
Sign In
Effect guide

Blob animation CSS: a morphing blob in plain CSS and SVG

A CSS blob animation is a soft shape whose outline keeps changing. You can make one by animating border-radius on a div, or by changing the path data of an SVG shape. The starter below does both.

Free skills to start. Pro is $79 a year for every skill, or $9.99 a month for 10. See pricing

What is a blob animation?

The quickest blob is a single div with a large, uneven border-radius. The property accepts two sets of radii split by a slash: the values before it are horizontal, the values after it are vertical. That gives every corner its own ellipse, so a square turns into a pebble. Percentages follow the box: horizontal ones refer to its width and vertical ones to its height. Each corner radius is a length or percentage that browsers blend as ordinary numbers, so two @keyframes with different radii produce a smooth morph.

The SVG blob is the version to pick when you want a shape that is not a rounded box, or a gradient, stroke or filter on a real outline. An SVG path stores its outline in the d attribute as a list of commands, and d can be animated. You change it either with a CSS transition or animation, or from script.

One rule from the CSS Backgrounds spec catches people who write radii by hand. If two radii on the same side add up to more than that side, the browser does not clip the shape. It multiplies every corner radius by the same factor, the smallest ratio of side length to radius sum. A blob whose horizontal radii add up past 100% on one edge therefore comes out rounder and smaller everywhere than you wrote it. Keep each pair at or under 100% and the shape you author is the shape you see.

How the effect works

For the border-radius blob, write two radius sets as the first and last keyframe and let the browser fill in between. Set the animation to repeat forever with animation-direction: alternate. Without alternate, each loop jumps back to the first frame. With it, the shape runs forward and then backward, so there is no seam. A slow ease-in-out over several seconds reads as organic movement.

For the SVG blob, the starter builds a closed path from seven points on a circle. Each frame it moves every point in and out by a different sine wave, then joins the points with cubic curves. The point count and command order never change. That matters because MDN's CSS d property page says its animated example works because the hover path has the same number of data points as the default one. The d property is also marked as not Baseline on MDN, so changing the path from script is the safer route when you need it in all browsers.

Both blobs respect the prefers-reduced-motion media feature. Its reduce value is true when the user has asked their device to cut non-essential motion. In the starter, CSS stops the border-radius animation, and the script checks the same setting and draws one still frame instead of looping.

  1. 01

    Draw the shape with border-radius

    Give a div equal width and height, a gradient fill, and a border-radius with a slash, such as 60% 40% 30% 70% / 60% 30% 70% 40%.

  2. 02

    Add a second shape and animate between them

    Put a different radius set in the to keyframe and run the animation with infinite and alternate so it loops without a jump.

  3. 03

    Build the SVG path from points

    Place points around a circle, push each one in and out with its own sine wave, and join them into a closed cubic path. Keep the point count fixed.

  4. 04

    Honour reduced motion

    In a prefers-reduced-motion: reduce block, set animation to none, and make the script draw one frame instead of looping.

  5. 05

    Move it with translate, not top and left

    To drift the blob across the page, animate translate. MDN advises against animating properties that affect the box model.

HTML

Two morphing blobs: border-radius and SVG path

Left: a div morphed with border-radius keyframes. Right: an SVG path rebuilt every frame from seven points. Both stop moving when the visitor has asked for reduced motion.

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Blob animation</title>
<style>
  html, body { margin: 0; height: 100%; background: #12101c; }
  body { display: flex; align-items: center; justify-content: space-around; }
  .css-blob {
    width: 280px; height: 280px;
    background: linear-gradient(135deg, #ff7a59, #c13cff);
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    animation: morph 8s ease-in-out infinite alternate;
  }
  @keyframes morph {
    to { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
  }
  svg { width: 320px; height: 320px; }
  @media (prefers-reduced-motion: reduce) {
    .css-blob { animation: none; }
  }
</style>
</head>
<body>
  <div class="css-blob"></div>
  <svg viewBox="-100 -100 200 200" aria-hidden="true">
    <defs>
      <linearGradient id="g" x1="0" y1="0" x2="1" y2="1">
        <stop offset="0" stop-color="#39d0ff"/>
        <stop offset="1" stop-color="#7a5cff"/>
      </linearGradient>
    </defs>
    <path id="blob" fill="url(#g)"/>
  </svg>
<script>
  const path = document.getElementById('blob');
  const N = 7;
  function shape(t) {
    const p = [];
    for (let i = 0; i < N; i++) {
      const a = (i / N) * Math.PI * 2;
      const r = 62 + 14 * Math.sin(t * 0.0011 + i * 1.7);
      p.push([Math.cos(a) * r, Math.sin(a) * r]);
    }
    let d = 'M' + p[0][0].toFixed(1) + ',' + p[0][1].toFixed(1);
    for (let i = 0; i < N; i++) {
      const p0 = p[(i + N - 1) % N], p1 = p[i];
      const p2 = p[(i + 1) % N], p3 = p[(i + 2) % N];
      const c1 = [p1[0] + (p2[0] - p0[0]) / 6, p1[1] + (p2[1] - p0[1]) / 6];
      const c2 = [p2[0] - (p3[0] - p1[0]) / 6, p2[1] - (p3[1] - p1[1]) / 6];
      d += 'C' + c1.map(v => v.toFixed(1)).join(',') + ' ' +
           c2.map(v => v.toFixed(1)).join(',') + ' ' +
           p2.map(v => v.toFixed(1)).join(',');
    }
    return d + 'Z';
  }
  path.setAttribute('d', shape(0));
  const reduce = window.matchMedia('(prefers-reduced-motion: reduce)');
  function frame(t) {
    path.setAttribute('d', shape(t));
    if (!reduce.matches) requestAnimationFrame(frame);
  }
  if (!reduce.matches) requestAnimationFrame(frame);
</script>
</body>
</html>

A starting point written for this page, free to use in your own projects. The skills below build the finished version with checks, fallbacks and a recorded video.

What to get right on a real page

  1. 01

    Keep radius pairs at or under 100%

    The spec scales all corner radii down by one factor when two radii on a side add up to more than that side. If your blob looks rounder than you wrote it, check the sums on each edge.

  2. 02

    Always use alternate for a loop

    Without animation-direction: alternate, each iteration restarts from the first keyframe, which shows as a jump. Alternate plays the keyframes backward on every second run.

  3. 03

    Keep the path structure identical

    If you animate the SVG d value, keep the same number of points and the same command order in every state. MDN's example of an animatable path relies on the same number of data points in both states.

  4. 04

    Move with translate, not top and left

    MDN notes that changing properties that affect the box model hurts animation performance and suggests translate and scale. Use them to drift a blob around the page.

  5. 05

    Use blur for soft glow blobs

    filter: blur() applies a Gaussian blur and takes a length. Percentages and negative values are invalid, so write a value like 60px.

  6. 06

    Ship a still for reduced motion

    MDN says scaling or panning large objects can trigger vestibular symptoms. A large background blob is exactly that, so stop it inside prefers-reduced-motion: reduce and keep the static shape.

Skills that build a blob animation

The starter gives you one blob. These Lookbk skills build a finished hero around a moving blob, with your brand colors, headline and buttons.

  1. Liquid Chrome Hero: an example of what it makes
    web
    Liquid Chrome HeroClaude CodeCodexCursor+3 more agents

    Motion Heroes · Pro

    Liquid Chrome Hero

    Animated WebGL hero · page + embed + 1080p video

    It builds a hero with a floating blob of liquid metal beside the headline. Droplets on looping paths melt into one slowly morphing shape with a ripple over its surface, in chrome, gold, rose gold or any tint. The motion loops every 8 to 20 seconds, and your agent also records a video of it.

    Worth knowing: It uses raw WebGL1 raymarching; without WebGL visitors see an SVG still instead.

    Needs: Node.js 18+, Chrome (or Chromium/Edge), and ffmpeg for the video

    See what Liquid Chrome Hero makes
  2. Lava Lamp Hero: an example of what it makes
    web
    Lava Lamp HeroClaude CodeCodexCursor+3 more agents

    Motion Heroes · Pro

    Lava Lamp Hero

    Animated WebGL hero · page + embed + 1080p video

    It builds a hero with a 1970s lava lamp beside the headline. Blobs of wax rise, stretch, split off drops and sink back as a metaball field, so they melt into each other where they meet. The motion loops seamlessly every 8 to 16 seconds.

    Worth knowing: It is raw WebGL1 metaballs; visitors without WebGL see the still.

    Needs: Node.js 18+, Chrome (or Chromium/Edge), and ffmpeg for the video

    See what Lava Lamp Hero makes
  3. Frosted Glass Hero: an example of what it makes
    web
    Frosted Glass HeroClaude CodeCodexCursor+3 more agents

    Motion Heroes · Pro

    Frosted Glass Hero

    Animated WebGL hero · HTML page + embed · MP4 recorder

    It builds a hero with a slowly turning piece of frosted glass: a noise-displaced WebGL blob that refracts and blurs a paper backdrop of drifting contour lines. A picker cycles through your colorways.

    Worth knowing: three.js and the fonts load from jsDelivr when the page opens; without the network visitors see the still picture.

    Needs: Node.js 18+, Chrome, and ffmpeg for the video

    See what Frosted Glass Hero makes

Install

Build a blob animation with your agent

Each skill is a SKILL.md folder, so it installs the same way in Claude Code, Codex, Cursor and other agents. The example below uses Liquid Chrome Hero; each skill page has its own prompt.

1. Paste the install prompt

Your agent runs the installer. The first time, it shows a sign-in link so you can approve it in the browser.

Install the "Liquid Chrome Hero" skill from Lookbk (https://lookbk.dev/skills/liquid-chrome-hero).
1. Run: curl -fsSL https://lookbk.dev/cli.js | node - add liquid-chrome-hero
2. If it prints a sign-in link, show it to me. When I say I approved it, run the same command again.
3. When the install finishes, read the SKILL.md it installed and tell me what you need from me to make the first result.

Or run it in a terminal

curl -fsSL https://lookbk.dev/cli.js | node - add liquid-chrome-hero

2. Start a new session

Agents load skills when a session starts. The installer writes the folder where your agent looks:

Claude Code
~/.claude/skills/liquid-chrome-hero
Codex
~/.agents/skills/liquid-chrome-hero
Cursor
~/.agents/skills/liquid-chrome-hero

3. Ask for the result

Describe it in plain words, for example:

Build a Liquid Chrome hero for Ferrous Audio's FA-1 headphone: graphite page, chrome blob with an orange rim light and faint sound rings, headline 'Sound, cast in one piece.', the driver size and weight in the corner, and record a 10-second loop for the launch post.

Another agent? Install a skill in any agent

FAQ

Questions

Still stuck? The guides cover installing, agents and licensing in more detail.

Read the guides
How do I make a blob shape in CSS?

Give a square element a border-radius with two sets of values split by a slash, for example 60% 40% 30% 70% / 60% 30% 70% 40%. Values before the slash are horizontal radii and values after it are vertical radii, so each corner becomes an ellipse.

How do I animate a blob in CSS?

Write a @keyframes rule with a different border-radius in the to keyframe, then apply it with infinite and alternate. Border-radius values are interpolated as numbers, so the browser fills in the shapes between.

What is the difference between a CSS blob and an SVG blob animation?

A border-radius blob is always a rounded box, which is enough for a soft background shape. An SVG blob is a path, so its outline can be any shape, and you can put a gradient, stroke or filter on it. The cost is that you must keep the path structure the same between states.

Why does my morphing SVG blob jump instead of blending?

The most likely cause is that the two path states have a different number of points. MDN's animated path example works because both states have the same number of data points. Keep the count and command order identical.

Does the d property work in every browser?

MDN lists the CSS d property as not Baseline, because it does not work in some of the most widely used browsers. The starter avoids the issue by setting the d attribute from script on every frame.

How do I make a blob animation accessible?

Wrap the motion in the prefers-reduced-motion media feature. When its reduce value is true, turn the animation off and show a still blob. MDN gives scaling or panning large objects as examples of vestibular triggers.