JSFiddle - React, Tailwind, and code Playground

HTML

<div id="elementToMove">

</div>

CSS

#elementToMove{
  position:absolute;
  top:0;
  left:0;
  -webkit-transition: left 1s ease;
        transition: left 1s ease;
  height:100px;
  width:100px;
  background:black;
}

JavaScript

setTimeout(function(){
         document.getElementById('elementToMove').style.left = '1000px'; // new left position is 1000px in this example
     }, 2000); // 2000 = 2 seconds