Ampanimation

<amp-animation id="" layout="nodisplay">
    <script type="application/json">
    </script>
</amp-animation>
<amp-animation id="{{id}}" layout="nodisplay">
    <script type="application/json">
        {{{json}}}
    </script>
</amp-animation>
{
  "id": null,
  "json": null
}

AMPAnimation

AMPAnimation relies on Web Animations API to define and run animations in AMP documents.

More information can be found in the AMP documentation.

Best Practices

  • Provide AMPAnimation with json and an id for triggering it with an event.