JSFiddle - React, Tailwind, and code Playground

HTML

<span id="test">word</span>

JavaScript

console.log('jquery css:', $('#test').css('width'));
console.log('getComputedStyle:', window.getComputedStyle(document.getElementById('test')).width);