JSFiddle - React, Tailwind, and code Playground
HTML
<form>
<input type=checkbox>
<label>Label <span>(selected)</span></label>
<br/>
<input type=checkbox>
<label>Label <span>(selected)</span></label>
</form>
CSS
body { font-size: 200% }
.etykieta_wybrana { color: red }
label span { display: none }
label.etykieta_wybrana span { display: inline }
JavaScript
$('input:checkbox').change(function () {
var $this = $(this);
if( $this.is(':checked') ) {
$this.next('label').addClass('etykieta_wybrana');
} else {
$this.next('label').removeClass('etykieta_wybrana');
}
});