JSFiddle - React, Tailwind, and code Playground
HTML
<form>
<input type="checkbox" value="1">1<br />
<input type="checkbox" value="2">2<br />
<input type="checkbox" value="3">3<br />
</form>
<div id="Output">
</div>
CSS
#Output {
width: 100px;
margin:.5em;
border: 1px dashed #ccc;
}
JavaScript
$('input').click(function(){
if(this.checked) {
$('#Output').text($('#Output').text() + $(this).val());
} else {
}
});