JSFiddle - React, Tailwind, and code Playground
by ajthomascouk
HTML
<span>
<input type="text" />
<img src="http://www.softenersupplies.com/images/close.png" alt="" />
</span>
CSS
span{position:relative;}
img{position:absolute; right:7px; top:2px;}
JavaScript
$('img').click(function(){
$(this).parent().find('input').val('');
});