18 CSS Radio Button Designs

3D Push

Skeuomorphic depressed-button style — the selected option sinks into the surface with an inverted shadow for tactile feedback.

Pure CSS MIT licensed

3D Push the 17th of 18 designs in the 18 CSS Radio Button Designs 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

<fieldset class="crb-push">
  <legend class="crb-sr">Difficulty</legend>
  <label><input type="radio" name="crb-push" /><span>Easy</span></label>
  <label><input type="radio" name="crb-push" checked /><span>Hard</span></label>
  <label><input type="radio" name="crb-push" /><span>Expert</span></label>
</fieldset>
.crb-push { display: flex; gap: 8px; border: 0; padding: 0; }
.crb-push input { appearance: none; -webkit-appearance: none; position: absolute; opacity: 0; }
.crb-push label { cursor: pointer; }
.crb-push span {
  display: block; padding: 10px 18px;
  background: linear-gradient(180deg, #2a2a3e, #1a1a28);
  color: #cbd5e1; font: 600 12px/1 system-ui, sans-serif;
  border-radius: 8px;
  box-shadow: 0 3px 0 #0c0c12, inset 0 1px 0 rgba(255,255,255,0.06);
  transform: translateY(0);
  transition: transform 0.12s, box-shadow 0.12s, color 0.2s, background 0.25s;
}
.crb-push input:checked + span {
  transform: translateY(3px);
  background: linear-gradient(180deg, #1a1a28, #0c0c12);
  color: #a78bfa;
  box-shadow: 0 0 0 #0c0c12, inset 0 2px 6px rgba(0,0,0,0.5), inset 0 0 0 1px rgba(124,108,255,0.3);
}

.crb-sr {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

Search CodeFronts

Loading…