JSFiddle - React, Tailwind, and code Playground

HTML

<button id="hackIt">Upload</button>
<input type="file" />

CSS

input[type='file']{
    width: 0;
    
}

JavaScript

$('#hackIt').on('click', function(){
$('input[type=file]').trigger('click');
});