recipe-svg-animation.md

Created about 13 hours ago

attributes
source_urlhttps://github.com/diffusionstudio/lottie/blob/3c72912fad543897f90045ed4d355813837927fc/skills/text-to-lottie/references/recipe-svg-animation.md

Recipe: SVG Animation

Use for generic "animate this SVG", SVG-to-Lottie, vector illustration reveals,
and SVG assets that are not clearly logo/icon/UI/lower-third/product/diagram
work.

Always read svg-compatibility.md with this recipe.

User-Language Aliases

  • "turn this SVG into Lottie", "animate this vector", "SVG reveal"
  • "make this illustration move", "draw this SVG", "bring this SVG to life"

Defaults

  • Keep output transparent unless the SVG is clearly a full-frame illustration or
    the user requests a background.
  • Preserve the source composition and viewBox.
  • Animate meaningful structure: groups, paths, strokes, accents, labels, or
    visual flow.
  • Route technical diagrams, product promos, and effect-led requests to their
    specific recipes when those are the main deliverable.

Presets

  • path-draw: strokes draw on with trim paths, then settle/fill.
  • layer-unfold: grouped elements reveal in depth or reading order.
  • fill-sweep: solid regions receive a directional color or opacity reveal.
  • illustration-drift: tiny grouped parallax/position motion after reveal.
  • morph-lite: small shape/position changes, only when source paths are safe.

Timing And Easing

  • Simple SVG/icon: 45-90 frames.
  • Complex illustration: 90-180 frames.
  • Use trim-path pacing based on perceived length, not raw segment count.
  • Use calm ease-out for assembly and avoid morphing unless geometry is safe.

Ask Only When Needed

  • Ask what part should move if the SVG is complex and no intent is given.
  • Ask transparent vs full-frame only when source framing is ambiguous.
  • Ask whether exact final fidelity matters if the prompt invites creative
    transformation.

Construction Notes

  • Inspect groups and paths before deciding animation units.
  • Resolve SVG styling and transforms enough that Lottie output is predictable.
  • Use masks/reveals for complex filled shapes; use trim paths for clean strokes.
  • Avoid path morphing unless paths have compatible vertex structure.
  • Expose slots for accent color, background color when used, and optional scale
    or emphasis controls when useful.

Common Failure Modes

  • Final frame no longer matches the source.
  • Hidden CSS styling disappears after conversion.
  • Fill rules or masks break holes/intersections.
  • Arbitrary path fragments move without a readable idea.

Acceptance Checks

  • Final frame matches the SVG source visually unless creative change was asked.
  • No holes, clips, masks, gradients, or intersections break in Skottie.
  • The animation has a clear reading order or reveal logic.
  • Transparent/full-frame background policy is intentional.

Copyright (c) 2026 Diffusion Studio Inc. License files are attached. MIT

MIT notice

Copyright (c) 2026 Diffusion Studio Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Children

No children yet.

Like how this is organised?

Build your own Memory tree on knowen.md: notes, decisions and tasks in one connected markdown graph, shared with your team and your AI agents.