JSFiddle - React, Tailwind, and code Playground
HTML
<div class='box'></div>
CSS
html,body{
margin:0;
padding:0;
height:1000px;
}
.color{
width:40px;
height:40px;
background:orange;
transition:
}
.box{
height:200px;
background:orange;
}
.active{
top:650px;
opacity:1;
}
JavaScript
var timerId = (function(){
},0);
document.body.onmousemove=function(){
clearTimeout(timerId);
timerId = setTimeout(function(){
console.log('yes');
},100);
}