JSFiddle - React, Tailwind, and code Playground

HTML

<span id="test">fffff</span>
<div>^-- What's the width of the overhang on the f?</div>
<div id="result">Calculated width: <span></span></div>

CSS

#test {
    background:#ccc;
    font-size:5em;
}

JavaScript

var width = $('#test').width();
$('#result span').text(width);