23 CSS Checkboxes

Neumorphic Checkbox

Dual box-shadows create extrusion. Checked state inverts to a pressed inset.

Pure CSS MIT licensed

Neumorphic Checkbox the 6th 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

<!-- Requires a light background on the parent -->
<label class="cb-neu">
  <input class="cb-neu__input" type="checkbox" checked />
  <span class="cb-neu__box">
    <svg width="12" height="9" viewBox="0 0 14 11" fill="none">
      <polyline
        points="1,5.5 5,9.5 13,1"
        stroke="#7c6cff"
        stroke-width="2.2"
        stroke-linecap="round"
        stroke-linejoin="round"
      />
    </svg>
  </span>
  <span>Neumorphic checkbox</span>
</label>
/* Card background must match: #e0e0e8 */
.cb-neu {
  display: inline-flex; align-items: center;
  gap: 10px; cursor: pointer; user-select: none;
}
.cb-neu__input { display: none; }
.cb-neu__box {
  width: 26px; height: 26px; border-radius: 8px;
  background: #e0e0e8; color: transparent;
  display: flex; align-items: center;
  justify-content: center;
  box-shadow:
     3px  3px 6px rgba(0,0,0,.18),
    -3px -3px 6px rgba(255,255,255,.7);
  transition: box-shadow .3s, color .3s;
}
.cb-neu__input:checked + .cb-neu__box {
  color: #7c6cff;
  box-shadow:
    inset 2px 2px 5px rgba(0,0,0,.15),
    inset -2px -2px 5px rgba(255,255,255,.6);
}

Search CodeFronts

Loading…