Skip to content

Animation & Motion

SVG Motion That Still Explains Something.

Draw a useful idea. Do not animate a logo into a hostage situation.

Aidxn
Written by Aiden Wood Founder and Lead Design Engineer
Path, signal, meaning An SVG path can reveal a process or relationship. Its title and description preserve the idea when motion is unavailable. NOISEDECISION

Path, signal, meaning

An SVG path can reveal a process or relationship. Its title and description preserve the idea when motion is unavailable.

Preview Maze Growth

SVG animation is strongest when it makes an idea easier to understand. A path can show direction, a state change can confirm an action, and a small shape movement can explain a relationship faster than a paragraph.

It becomes noise when it is only movement. Build the static graphic first. Label it when it carries meaning. Then add transform and opacity motion that can disappear without taking the message with it.

Draw paths with a normalised length

pathLength='1' gives an SVG path a convenient normalised length. That means the CSS works for any path without calculating its length in JavaScript.

<svg viewBox='0 0 640 180' role='img' aria-labelledby='flow-title flow-desc'>
  <title id='flow-title'>Lead flow</title>
  <desc id='flow-desc'>A lead moves from form submission to review and then follow up.</desc>
  <path
    class='flow-path'
    pathLength='1'
    d='M40 90 C170 20 250 160 360 90 S520 20 600 90'
  />
</svg>
.flow-path {
  fill: none;
  stroke: currentColor;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw-path 900ms ease-out both;
}

@keyframes draw-path {
  to { stroke-dashoffset: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .flow-path {
    animation: none;
    stroke-dashoffset: 0;
  }
}

The SVG says what the diagram is through its title and desc. The visual is still complete when the animation does not run. For a purely decorative flourish, remove it from the accessibility tree with aria-hidden='true' instead.

Animate transforms and opacity

For a small icon or diagram node, transform and opacity are the cleanest visual tools. Set the SVG transform origin deliberately so browser differences do not turn a subtle motion into a strange orbit.

.diagram-node {
  transform-box: fill-box;
  transform-origin: center;
  animation: settle 480ms cubic-bezier(.2, .8, .2, 1) both;
}

@keyframes settle {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

Use a short sequence when there is a hierarchy: the title arrives, then support, then the diagram. Do not keep a browser busy with an endless visual just to prove you know keyframes.

Do not promise free form path morphing

A path is data. Smoothly morphing from one arbitrary path to another requires compatible path structure or a tool that normalises the shapes. Test the intermediate frames, not only the two endpoints. If the transition cannot explain a state change, use a fade or a transform instead.

Velocity Components fit

Maze Growth is the useful version of this pattern: a geometric path reveals itself with a normalised dash effect. Flow Lines is the other end of the spectrum: decorative ambient movement that sits behind the content rather than replacing it.

Both are component library ideas, not one off page tricks. A subscriber should be able to preview the static state, turn off motion, read the accessibility intent, then install the version that suits the product.

Accessibility checklist

  • Use role='img' plus title and desc when the SVG conveys information.
  • Use aria-hidden='true' for decoration that duplicates nearby text.
  • Keep a readable static final state under reduced motion.
  • Do not hide essential labels inside an animated drawing.
  • Check colour contrast and test the graphic at zoom.

Sources and further reading

Let us make some quick suggestions?

Please provide your full name.
Please provide your phone number.
Please provide a valid phone number.
Please provide your email address.
Please provide a valid email address.
Please provide your brand name or website.
Please provide your brand name or website.