JSFiddle - React, Tailwind, and code Playground

by Avin Varghese

HTML

<input type="text" name="FirstName" value="Mickey">

JavaScript

$(function(){
    $("input").keyup(function(e){
         $(this).val($(this).val().replace(/^\s/g, ""));
    });
});