JSFiddle - React, Tailwind, and code Playground

by Matthew Day

HTML

<input type="text" size="4" value="Johnny" onkeypress="this.style.width = ((this.value.length + 1) * 8) + 'px';" />

CSS

input {
  /* width: 100px; */
}