Back to CSS Checkboxes Retro Pixel Checkbox Pure CSS
Share
.cb-pixel {
  display: inline-flex; align-items: center;
  gap: 10px; cursor: pointer; user-select: none;
}
.cb-pixel__input { display: none; }
.cb-pixel__box {
  width: 26px; height: 26px;
  border: 3px solid #1ed98a;
  display: flex; align-items: center;
  justify-content: center; overflow: hidden;
  transition: background .25s;
}
.cb-pixel__svg {
  width: 14px; height: 11px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  opacity: 0; transform: scale(.5);
  transition: opacity .2s,
    transform .3s cubic-bezier(.34,1.56,.64,1);
}
.cb-pixel__input:checked + .cb-pixel__box {
  background: rgba(30,217,138,.15);
}
.cb-pixel__input:checked
  + .cb-pixel__box .cb-pixel__svg {
  opacity: 1; transform: scale(1);
}
<label class="cb-pixel">
  <input class="cb-pixel__input" type="checkbox" checked />
  <span class="cb-pixel__box">
    <svg class="cb-pixel__svg" viewBox="0 0 10 8" shape-rendering="crispEdges" fill="#1ed98a">
      <rect x="0" y="4" width="2" height="2" />
      <rect x="2" y="6" width="2" height="2" />
      <rect x="4" y="4" width="2" height="2" />
      <rect x="6" y="2" width="2" height="2" />
      <rect x="8" y="0" width="2" height="2" />
    </svg>
  </span>
  <span>Retro pixel checkbox</span>
</label>
Live preview Edit any tab — preview updates live Ready