JSFiddle - React, Tailwind, and code Playground
HTML
<div style="width:500px;height:25px;position:absolute; overflow:hidden; word-break:keep-all" id="">
<input type="button" value="Upload Button" style="width:110px" />
<span id="files">
No files selected.
</span>
</div>
<input type="file" style="position:absolute;width:100px;height:30px;opacity:0;" id="selector"/>
JavaScript
document.getElementById("selector").addEventListener("change",function(){
document.getElementById("files").innerHTML=
document.getElementById("selector").files[0].name;
});