They can create and manipulate it, access properties from the element, change them, etc.
Be helpful and kind and yours will be published no problem. Depending on your needs you may need to support things like canceling animations or chaining animations together, which is still doable using the building blocks described above. Cobrasvg.js is a lightweight and easy-to-use JS library that uses stroke’s dashoffset and dasharray attributes to SVG path animations.
This is how most JS animation libraries work under the hood anyway. Here’s a very simple demo animating some SVG-specific properties. or "Tricks".
*May or may not contain any actual "CSS" There are plenty of quirks to be concerned about while animating SVG.
Even velocity.js, which only handles animation, adds 48 KB minified to your bundle sizes.
this` or multiline blocks within triple backtick fences (```) with double new lines before and after. Here’s an example that does things their own way that’s pretty interesting. The example above is very basic, and in practice you may want to move animation code into a helper function or class to keep things reusable. We looked at CSS, which is great and pretty comfortable, but it can’t do a number of SVG properties that you might want to animate.
Adobe has collected a number of examples themselves. But once you’re up and running, the syntax can be really wonderful and friendly to animations and the performance can actually be top notch. // create the circle node, set attributes, and append it to the SVG node, // ...skipping SVG circle setup code from above. In general you can leave the namespace param as null when working with SVG attributes.