JSFiddle - React, Tailwind, and code Playground

HTML

<input type="text" value=""/>

JavaScript

$("input").keyup(function() {
    if(this.value.indexOf('http://') !== 0) {
        this.value = this.value+'http://';   
    } 
    
});