# Defining Animations for SVG Components You can use child components in the **\** component to animate attributes over time. ## Attribute Style Animation In the [animate](../reference/arkui-js/js-components-svg-animate.md) child component of the **\** component, set **attributeName** to the attribute you want to animate, set **from** to the animation start value, and set **to** to the animation end value. ```html
Hello World
``` ![en-us_image_0000001183871404](figures/en-us_image_0000001183871404.gif) > **NOTE** > > When values is also set, the **from** and **to** settings do not take effect. ## Motion Path Animation In the [animateMotion](../reference/arkui-js/js-components-svg-animatemotion.md) child component of the **\** component, set path to define a shape for the animation. ```html
``` ![en-us_image_0000001229510983](figures/en-us_image_0000001229510983.gif) ## animateTransform Animation In the [animateTransform](../reference/arkui-js/js-components-svg-animatetransform.md) child component of the <svg> component, set attributeName to bind the corresponding attribute to the transform attribute, and set type to the animation type, from to the start value, and to to the end value. ```html
``` ```css /* xxx.css */ .container { flex-direction: column; align-items: center; width: 100%; height: 100%; background-color: #F1F3F5; } ``` ![en-us_image_0000001182832088](figures/en-us_image_0000001182832088.gif)