JSFiddle - React, Tailwind, and code Playground
HTML
<div id="special">
</div>
CSS
#special
{
width: 400px;
height: 400px;
background-color: Gray;
}
JavaScript
$("#special").mousemove(function(e){
var x = e.pageX - this.offsetLeft;
var y = e.pageY - this.offsetTop;
$('#special').html(x +', '+ y);
});