anvil · documentation · gallery · llms.txt
How-to guide

How to author Lottie by hand

When no preset fits, set spec.data to a full Lottie document. A Lottie document is { v, fr, ip, op, w, h, layers }; layers are shape layers (ty: 4) holding shape groups.

Start from a skeleton

{
  "id": "custom",
  "kind": "lottie",
  "width": 200,
  "height": 200,
  "data": {
    "v": "5.7.0", "fr": 60, "ip": 0, "op": 60, "w": 200, "h": 200,
    "layers": [ /* shape layers here */ ]
  }
}

Animate properties

Animated properties use { "a": 1, "k": [keyframes] }; static properties use { "a": 0, "k": value }. The preset builders in @acoyfellow/anvil/lottie-author show the exact shapes for rings, fills, strokes, and trim paths — copy from there.

Validate the result with assertSpec. The structural fields it checks are listed under SceneSpec → LottieSpec.