JSFiddle - React, Tailwind, and code Playground

by Gegeprima

HTML

<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/latest/TweenLite.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/latest/plugins/CSSPlugin.min.js"></script>
<div id="demo">
    <div id="logo"><img id="logo" src="http://www.royanonuevo.com/css/images/character.png"></div>
</div>
<input type="button" id="tweenBtn" value="create new tween">

CSS

#demo {
    width: 692px;
    height: 100px;
    background-color: darkblue;
    padding: 8px;
    overflow:hidden;
}
#logo {
    position: relative;
    width: 60px;
    height: 100px;
   }

JavaScript

var logo = document.getElementById("logo"),
        tweenBtn = document.getElementById("tweenBtn");
     
    tweenBtn.onclick = function() {
        //logo will animate 100px to the right of its current position
        TweenLite.to(logo, 0.8, {left:"+=150px"});
    };