JSFiddle - React, Tailwind, and code Playground
HTML
<div class="new_Btn">SelectPicture</div><br>
<input id="html_btn" type='file'><br>
CSS
.new_Btn {
// your css propterties
}
.selected{
background-color: yellow;
}
#html_btn {
display:none;
}
JavaScript
$but = $('.new_Btn');
$file = $('#html_btn');
$but.bind("click" , function () {
$file.click();
});
$file.change(function(){
//trim removes whitespace
if( $.trim($file.val()) != "" ) $but.addClass('selected');
else $but.removeClass('selected');
});