anime.js example

Example 1: anime js link

<script src="https://cdnjs.cloudflare.com/ajax/libs/animejs/3.2.1/anime.min.js" integrity="sha512-z4OUqw38qNLpn1libAN9BsoDx6nbNFio5lA6CuTp9NlK83b89hgyCVq+N5FdBJptINztxn1Z3SaKSKUS5UP60Q==" crossorigin="anonymous"></script>

Example 2: animejs

// In your terminal:
$ yarn add animejs // or npm install animejs --save

// In your js file
import anime from 'animejs/lib/anime.es.js';

anime({
  targets: '#your-css-selector',
  width: '100%', // -> from '28px' to '100%',
  easing: 'easeInOutQuad',
  direction: 'alternate',
  duration: 3000,
  loop: true
});