Guide to the SVG animateTransform Element in SMIL

This article explains the function and usage of the <animateTransform> element within Synchronized Multimedia Integration Language (SMIL) for SVG. It covers how <animateTransform> controls geometric transformations—such as translation, rotation, scaling, and skewing—over time, outlines its core attributes, and highlights how it differs from standard SVG animation elements to create dynamic, scalable vector graphics.

What is the <animateTransform> Element?

The <animateTransform> element is a dedicated SMIL animation element designed specifically to animate transformation attributes on target SVG elements. While standard SVG attributes like coordinates (x, y) or styles (opacity, fill) can be animated using the <animate> tag, the transform attribute requires specialized handling.

Because SVG transformations often involve coordinate matrices and parameters (such as rotation angles and center points), <animateTransform> allows developers to interpolate these transform operations smoothly over a specified duration without requiring external JavaScript or CSS.

Supported Transformation Types

The type attribute specifies the category of transformation being applied. The <animateTransform> element supports five primary transformation types:

Key Attributes of <animateTransform>

To control the timing, values, and behavior of the transformation, <animateTransform> relies on several core attributes:

How <animateTransform> Differs from <animate>

The standard <animate> element modifies scalar attributes, colors, or direct path data over time. However, it cannot correctly parse or interpolate the multi-parameter syntax of the transform attribute (such as a 3-value rotation: angle, center-x, center-y).

The <animateTransform> element understands the mathematical rules of 2D transformation matrices. It ensures that operations like rotating around an offset anchor point or compounding scaling and translation are rendered properly throughout the animation cycle.