SVG & Generative Art
SVG animations, generative art, masks and clip-path.
Updated
How do you animate SVG, and why use it instead of a GIF?
SVG animations stay sharp at any size and weigh a few kilobytes. Line drawing animates stroke-dashoffset against stroke-dasharray, fills and colours use CSS transitions, shapes morph between paths that share the same number of points, and generative art such as flow fields is computed in JavaScript and drawn as SVG or canvas.
How to choose, performance and accessibility
- Use Line Draw or Logo Draw to reveal a logo or an illustration, Animated Icons for interface feedback, and Perlin Flow Field or Geometric Tessellation as generative backgrounds.
- Compared with a GIF, SVG is lighter, scalable and restylable in CSS.
- Simplify complex paths, give meaningful graphics a
title, and hide purely decorative ones from screen readers witharia-hidden. - Line Draw, Perlin Flow Field and Text Mask Video are free with their full code; the rest come with Premium.
Your SVGs, with volume
The effects below animate your SVGs flat. The SVG to 3D generator gives them thickness: drop your file, set the material and the edges, and the object spins. A PNG logo works too — it gets traced on the way in.
The preview and the image are free. The code comes with a subscription.
Open the generatorLine Draw
SVG path that progressively draws itself using stroke-dasharray and dashoffset.
View source code
<div class="demo-preview">
<div class="svg-container">
<svg class="line-draw-svg" viewBox="0 0 150 150">
<path d="M20,75 L50,30 L80,60 L110,20 L130,50 M20,130 L60,90 L100,110 L130,80"/>
</svg>
</div>
</div>.demo-preview,
.demo-preview *,
.demo-preview *::before,
.demo-preview *::after {
box-sizing: border-box
}
.demo-preview {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 250px;
overflow: hidden;
position: relative;
background: rgb(26, 26, 36);
color: rgb(255, 255, 255);
font-family: sans-serif;
}
.svg-container {
display: flex;
align-items: center;
justify-content: center;
}
.line-draw-svg {
width: 150px;
height: 150px;
}
.line-draw-svg path {
fill: none;
stroke: #6366f1;
stroke-width: 3;
stroke-linecap: round;
stroke-linejoin: round;
stroke-dasharray: 500;
stroke-dashoffset: 500;
animation: lineDraw 3s ease forwards infinite;
}
@keyframes lineDraw {
0% {
stroke-dashoffset: 500;
}
50% {
stroke-dashoffset: 0;
}
100% {
stroke-dashoffset: -500;
}
}/* Pure CSS — no JavaScript required */Logo Draw
Complex logo drawing animation with multiple elements in sequence.
Morphing Shape
Shape that transforms into different geometries with CSS animation.
SVG Fill Animation
Shape that progressively fills with color from bottom to top.
Animated Icons
Icons with subtle animations: checkmark and X that draw themselves.
Path Following
Element that follows a defined SVG path using animateMotion.
SVG Text Draw
Text whose outline draws itself then fills with color.
Pulse / Heartbeat
SVG heart with heartbeat animation and pulse wave rings.
Rotating Gears
Interlocking gears rotating in opposite directions.
Wave Path
Animated wavy line with gradient and motion effect.