JSFiddle - React, Tailwind, and code Playground

HTML

<input type="file" />
<button>Test</button>

JavaScript

$('button').click(function() {
    $('input[type="file"]').trigger('click');    
});