# Scripting Template Repeater as a component

**URL:** <https://forum.inductiveautomation.com/t/scripting-template-repeater-as-a-component/60478>\
**Category:** Ignition\
**Tags:** ignition80\
**Created:** [June 8, 2022, 6:02am UTC](https://forum.inductiveautomation.com/t/scripting-template-repeater-as-a-component/60478 "2022-06-08T06:02:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![yash.gala](https://avatars.discourse-cdn.com/v4/letter/y/53a042/32.png) [@yash.gala](https://forum.inductiveautomation.com/u/yash.gala)\
**Post date:** [June 8, 2022, 6:02am UTC](https://forum.inductiveautomation.com/t/scripting-template-repeater-as-a-component/60478/1 "2022-06-08T06:02:27Z")

</div>

Hello,

Issue:  
I am trying to add a component scripting to create animation for a Template Repeater but I am not able to use the repeater as a component.

Task:  
I want to use system.gui.transform function to add a left to right animation for the template repeater from a button click. Button component scripting I am trying is something like this :

`component ` `=` `event.source.parent.getComponent(` `Template Repeater` `)`

`origX ` `=` `component.x`

`origY ` `=` `component.y`

`system.gui.transform(`

` ` `component,`

` ` `0` `, ` `0` `,`

` ` `duration` `=` `1000` `,`

` ` `callback` `=` `lambda` `: system.gui.transform(`

` ` `component,`

` ` `origX, origY,`

` ` `duration` `=` `2000` `,`

` ` `acceleration` `=` `system.gui.ACCL_FAST_TO_SLOW`

` ` `)`

`)`

Any support/ help will be appreciated.
