JSFiddle - React, Tailwind, and code Playground

HTML

<div class="container">
  <form action="">
    <div class="form-item">
      <label for="">тестовый</label>
      <input type="text" onkeypress="this.style.width = ((this.value.length + 1) * 20 + 10) + 'px';">
    </div>
  </form>
</div>

CSS

.container {
  width: 60%;
  margin: 0 auto;
}

input {
    font: 30px Courier New;
    font-weight: 100;
    color: #231f20;
    background: transparent;
    border: none;
    border-bottom: 4px solid #432821;
    height: 42px;
    padding-left: 22px;
    padding-bottom: 13px;
    margin-left: 11px;
    width:100px;
}