JSFiddle - React, Tailwind, and code Playground
HTML
<input type="text" />
<input type="file" />
CSS
input[type=file] {
display:block;
height:0;
width:0;
}
JavaScript
$('input[type=text]').click(function() {
$('input[type=file]').trigger('click');
});
$('input[type=file]').change(function() {
var vals = $(this).val(),
val = vals.length ? vals.split('\\').pop() : '';
$('input[type=text]').val(val);
});