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="restartBtn" value="restart">

CSS

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

JavaScript

var logo = document.getElementById("logo"),
        restartBtn = document.getElementById("restartBtn"),
        tween = TweenLite.to(logo, 1, {left:"632px"});
         
    restartBtn.onclick = function() {
        tween.restart();
    }