JSFiddle - React, Tailwind, and code Playground

by Ismail Ibraheem Shurrab

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() {
    $('input[type=text]').val($(this).val());
});