To quickly create a wide range of animations you can add an animation library to your app (see the prerequisites section above). We’ve provided an example below of working with a library called animate.css.

Animate.css has plenty of animations that can be used by adding one or two classes to the HTML element you want to animate. To add a class you probably don’t want to type it into the HTML directly as it will be run as soon as the screen loads, which will mean you probably won’t see the animation. Instead you might want to animate based on a user’s action. To do this we can add a class to the HTML dynamically with JavaScript.

$('.my-button').on('click', function () {
  $('.my-element').addClass('animated bounceIn');