JSFiddle - React, Tailwind, and code Playground

by Tahir Ahmed

HTML

<svg height='300px' width='500px' style='position: absolute;'>
    <rect id='rect' width='200' height='75' style='fill:#888;stroke-width:2;stroke:#000' y='0' x='120' />
</svg>

<script src='https://cdnjs.cloudflare.com/ajax/libs/gsap/1.18.0/TweenMax.min.js'></script>

JavaScript

TweenMax.set('#rect', { rotation: 45 });
function animate(){
    TweenMax.to('#rect', 1, { x: 100 });
}
setTimeout(animate, 1000);