JSFiddle - React, Tailwind, and code Playground

HTML

<label class="form-label">
                    <input id="checkbox" type="checkbox">
                    <span>title</span>
                  </label>

CSS

.form-label {
  display: inline-flex;
  cursor: pointer;
  position: relative;
}

.form-label > input {
  height: 20px;
  width: 20px;
  -webkit-appearance: none;
  -moz-appearance: none;
  -o-appearance: none;
  appearance: none;
  border: 1px solid #CDCDCD;
  border-radius: 4px;
  outline: none;
  background-color: #ffffff;
  cursor: pointer;
}

.form-label > input:checked {
  border: 1px solid #000000;
  background-color: #ffffff;
}

.form-label > input:checked + span::before {
  content: '\2713';
  display: block;
  text-align: center;
  color: #000000;
  position: absolute;
  left: 8px;
  top: 3px;
}

.form-label > input:checked + span::before:focus {
  outline: none;
}