JSFiddle - React, Tailwind, and code Playground
HTML
<div id="test"></div>
CSS
#test {
width: 300px;
height: 200px;
}
JavaScript
var box = document.getElementById('test');
var range = box.getBoundingClientRect();
console.dir(range);