23 CSS Checkboxes

3D Flip Checkbox

The box rotates on the Y axis using rotateY to reveal a checked face.

Pure CSS MIT licensed

3D Flip Checkbox the 11th of 23 designs in the 23 CSS Checkboxes collection. The design is implemented in pure CSS — no JavaScript required. Copy the HTML and CSS panels below into your project. Because the demo is pure CSS, it works in any framework or templating engine you happen to use. The design honours prefers-reduced-motion and uses real semantic markup, so it ships accessibility-ready out of the box.

Live preview

Open in playground

The code

<label class="cb-flip">
  <input class="cb-flip__input" type="checkbox" checked />
  <span class="cb-flip__box">
    <span class="cb-flip__face">&#10003;</span>
  </span>
  <span>3D flip checkbox</span>
</label>
.cb-flip {
  display: inline-flex; align-items: center;
  gap: 10px; cursor: pointer; user-select: none;
}
.cb-flip__input { display: none; }
.cb-flip__box {
  width: 26px; height: 26px; border-radius: 7px;
  border: 2px solid rgba(124,108,255,.3);
  perspective: 80px;
  position: relative;
}
.cb-flip__face {
  position: absolute; inset: 0; border-radius: 5px;
  background: #7c6cff;
  display: flex; align-items: center;
  justify-content: center;
  color: #fff; font-size: 14px;
  transform: rotateY(90deg);
  transform-origin: center;
  transition: transform .4s cubic-bezier(.23,1,.32,1);
}
.cb-flip__input:checked
  + .cb-flip__box .cb-flip__face {
  transform: rotateY(0deg);
}

Search CodeFronts

Loading…