JSFiddle - React, Tailwind, and code Playground
by holden321
HTML
<div>
<input type="file" />
</div>
CSS
div.selected {
background:yellow;
}
JavaScript
$("input[type=file]").change(function () {
$(this).parent()[(this.value ? 'add' : 'remove') + 'Class']('selected');
});