Overview
Authored SVG paths with matching command structure (same M / C / Z command counts, same anchor types) so a values= list can morph between them via SMIL <animate> or CSS d: path() interpolation. Three clean-room morph routes: crystal → signal, seal → spark, petal → sigil.
When to use it
Reach for path morph on logo transitions, icon swaps where the silhouettes are intentionally related, and brand animations between sister marks. Skip morphing between unrelated paths — the interpolation will look broken because the control points have no semantic correspondence. Skip imported logo data; authored matching paths beat retrofitting external SVGs every time.
How it works
Both shapes are authored as SVG paths that share the same command-by-command structure: same count of M (moveto), C (cubic Bezier), and Z (closepath) commands in the same order. The interpolator pairs commands by index and tweens the coordinate values between them. With SMIL, use <animate attributeName="d" values="path1; path2; path1" dur="3s" repeatCount="indefinite" /> inside the <path>. With CSS, use @keyframes on the path’s d property: d: path('...') at each keyframe.
Production gotchas
Mismatched command counts produce snap-jumps mid-morph (the interpolator gives up and renders the next path directly). The most common bug: one path uses L (lineto) where the other uses C (curveto) for the same visual segment — even if they look identical at rest, they cannot interpolate. Convert all lineto’s to curveto’s for morph-readiness. Tools like svg-path-commander or flubber can normalize command structure post-hoc but introduce extra control points. CSS d: path() interpolation is not supported in older Safari (< 16) — fall back to SMIL or JS.
Accessibility
Add an SVG <title> describing the morph target (e.g. “Crystal transforming into signal”). Under prefers-reduced-motion: reduce pin the path at its final shape (skip the morph animation entirely) — the user gets the destination state without watching the transformation. Avoid morphs that change the perceived meaning of an icon mid-animation, since screen readers announce the title once.
References