JSFiddle - React, Tailwind, and code Playground

by Kevin Pliester

HTML

<div class="animate"></div>

CSS

.animate {
  height: 100px;
  width: 150px;
  background-color: #c00;
  -webkit-transition: all 1s ease;
  -moz-transition: all 1s ease;
  -o-transition: all 1s ease;
  -ms-transition: all 1s ease;
  transition: all 1s ease;
  position: absolute;
  top: 30%;
  right: 0;
  transform: rotate(-90deg);
  transform-origin: right bottom;
}

.animate.move {
  top: 0;
  left: calc( 100% - 100px); /*.deleted box width*/
}

JavaScript

$('.animate').mouseenter(
    function(){$(this).addClass("move");}
)