Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/pages/utilities/animations.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,15 @@ this.animationCtrl.create()
.duration(1500)
.iterations(Infinity)
.fromTo('transform', 'translateX(0px)', 'translateX(100px)')
.fromTo('opacity', '1', '0.2');
.fromTo('opacity', '1', '0.2')
.play();
```
</docs-tab>
<docs-tab tab="react">

```typescript
<CreateAnimation
play={true}
duration={1500}
iterations={Infinity}
fromTo={[
Expand All @@ -139,6 +141,8 @@ this.animationCtrl.create()
</docs-tab>
</docs-tabs>

You can view a live example of this in Angular [here](https://stackblitz.com/edit/ionic-angular-basic-animations) and in React [here](https://stackblitz.com/edit/ionic-react-basic-animations).

In the example above, an animation that changes the opacity on the `.square` element and moves it from left to right along the X axis has been created. This animation will run an infinite number of times, and each iteration of the animation will last 1500ms.

By default, all Ionic Animations are paused until the `play` method is called.
Expand Down