JSFiddle - React, Tailwind, and code Playground
HTML
<div> Geen input </div>
<div>
deze heeft stijl <br />
<input type=text />
</div>
CSS
.styled{ background:red; color:white; }
body{background:#fefefe}
JavaScript
$('input').parent('div').addClass('styled');