JSFiddle - React, Tailwind, and code Playground
HTML
<button>Bigger</button>
<input id="code" type="text" />
CSS
#code{
width:16px;
}
JavaScript
$(document).ready(function(){
$('#code').keyup(function(e){
//on change animate a width of +16px increase.
if(e.keyCode == 8) {
$(this).animate({width: '-=16'});
} else {
$(this).animate({width: '+=16'});
}
});
});