JSFiddle - React, Tailwind, and code Playground
HTML
<input type="checkbox" class="input--checkbox" name="access_3833_774" value="chanel_idea"> Текст
CSS
/* Checkbox */
/*input[type="checkbox"]:not([disabled]) {*/
/* background: red!important;*/
/*}*/
.input--checkbox {
-webkit-appearance: none;
-moz-appearance: none;
-ms-appearance: none;
-o-appearance: none;
appearance: none;
position: relative;
top: 2px;
right: 0;
bottom: 0;
left: 0;
width: 14px;
height: 14px;
min-width: 14px;
min-height: 14px;
max-width: 14px;
max-height: 14px;
transition: all 0.15s ease-out 0s;
background: #fff;
border: 1px solid #E0E0E0;
color: #fff;
cursor: pointer;
display: inline-block;
margin: 0;
outline: none;
position: relative;
}
.input--checkbox:hover {
border: 1px solid #2d9cdb;
}
.input--checkbox[disabled]:checked {
background: #c2e9ff;
border: 1px solid #c2e9ff;
}
.input--checkbox:checked {
background: #2d9cdb;
border: 1px solid #2d9cdb;
}
.input--checkbox:checked::before {
content: '';
position: absolute;
left: 4px;
top: .5px;
width: 3px;
height: 7px;
border: solid #fff;
border-width: 0 2px 2px 0;
transform: rotate(45deg);
}
.input--checkbox:checked::after {
background: #2d9cdb;
content: '';
display: block;
position: relative;
}
/* Checkbox END */
JavaScript
const inputEl = document.querySelector('input');
inputEl.addEventListener('change', function() {
console.log(`Is checked? : ${this.checked}`)
})