JSFiddle - React, Tailwind, and code Playground
HTML
<form>
<input type="text" id="input" />
<button id="btn">increase text and see the width of input, button</button>
</form>
JavaScript
var btnwidth = $("#btn").width();
$("#input").css("width",btnwidth);