JSFiddle - React, Tailwind, and code Playground
HTML
<div id="container" class="some-class"></div>
CSS
.some-class {
border: 1px solid;
width: 500px;
height: 100px;
padding: 10px;
}
JavaScript
var rect = document.getElementById('container').getBoundingClientRect();
var height = rect.height;
alert(height);