Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49086

Ionic 5 checkbox spin animation

$
0
0

Hi folks,

I’m playing around Ionic 5 animations and here is some interesting aproach for checkbox

for .html file:

<ion-checkbox slot="start" class="ion-checkbox" (click)="playCheckboxAnimation($event)"></ion-checkbox>

For .ts file:

playCheckboxAnimation(event): void{
    console.log(event);
    const animation: Animation = createAnimation('')
      .addElement(event.srcElement)
      .easing('cubic-bezier(0, 0.55, 0.45, 1)')
      .duration(500)
      .fromTo('transform', 'rotate(0)', 'rotate(360deg)');
    animation.play();
  }

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 49086

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>