JSFiddle - React, Tailwind, and code Playground

HTML

<div id="to_drag" draggable="true">
  attrape moi !
</div>
<br><br>
<div id="to_drop" droppable="true">
  jette moi ici !
</div>

CSS

#to_drop {
  width: 100px;
  height: 100px;
  border: thin solid #000;
  background-color: #0f0
}

#to_drag {
  width: 100px;
  height: 20px;
  border: thin solid #000;
  background-color: #f0f
}

JavaScript

document.getElementById('to_drop').ondragover = function(event) {
    console.log(event.target.id); // to_drop dès que tu passes au dessus
};