JSFiddle - React, Tailwind, and code Playground
HTML
<div id="test"></div>
CSS
#test{
width: 300px;
height: 100px;
background-color: red;
color: white;
position: relative;
top: 10px;
left: 10px;
}
JavaScript
$('#test').text(
' w:' + $('#test').width() +
' h:' + $('#test').height() +
' t:' + $('#test').offset().top +
' l:' + $('#test').offset().left
);