JSFiddle - React, Tailwind, and code Playground

by Andrey Kogut

HTML

<div id="d">
  <button disabled>test button</button>
</div>

CSS

button {
  display: block;
  width: 100%;
  border: 0 none;
  background: red;
  color: white;
}

JavaScript

document.getElementById("d").addEventListener("mouseleave", function() {alert("leave")});