JSFiddle - React, Tailwind, and code Playground

HTML

<body>
   <a href="#" class=link >CLICK ME</a>

   <div class=box></div>

 </body>

CSS

.box {
    height:100px;
    width:200px;
    border: solid red 5px;   
    position: relative;
    left: 1px;
    -webkit-transition: left 2s ease-in-out;
    -moz-transition: left 2s ease-in-out;
    -ms-transition: left 2s ease-in-out;
    -o-transition: left 2s ease-in-out;
    transition: left 2s ease-in-out;
    
}

.link:hover {
    color:red;
}

.link:active {
    color:grey;
}

.link:active + .box {
    left: 500px;
}