JSFiddle - React, Tailwind, and code Playground

HTML

<script src="http://cloud.github.com/downloads/digitalBush/jquery.maskedinput/jquery.maskedinput-1.3.js" type="text/javascript"></script>
<input type="text" name="percent" class="percent" value="" />

JavaScript

$(function(){
    $(".percent").mask("9?9%");
    
    $(".percent").on("blur", function() {
        var value = ($(this).val().length == 1) ? $(this).val() + '%' : $(this).val();
        $(this).val( value );
    })
});