JSFiddle - React, Tailwind, and code Playground

HTML

<input id="myText" type="text" onkeyup="myFunction()">

JavaScript

function myFunction(){
	document.getElementById("myText").value = document.getElementById("myText").value.toLowerCase();
}