18 CSS Radio Button Designs

Avatar Picker

Round avatar tiles that scale up and glow on selection — perfect for character/profile pickers in onboarding flows.

Pure CSS MIT licensed

Avatar Picker the 15th 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-avatar">
  <legend class="crb-sr">Avatar</legend>
  <label style="--c: #7c6cff"><input type="radio" name="crb-avatar" /><span>A</span></label>
  <label style="--c: #ff6c8a"><input type="radio" name="crb-avatar" checked /><span>B</span></label>
  <label style="--c: #2ecc8a"><input type="radio" name="crb-avatar" /><span>C</span></label>
  <label style="--c: #f5a623"><input type="radio" name="crb-avatar" /><span>D</span></label>
</fieldset>
.crb-avatar { display: flex; gap: 10px; border: 0; padding: 0; }
.crb-avatar input { appearance: none; -webkit-appearance: none; position: absolute; opacity: 0; }
.crb-avatar label { cursor: pointer; }
.crb-avatar span {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c), white 30%));
  font: 700 14px/1 system-ui, sans-serif; color: #fff;
  box-shadow: 0 0 0 0 var(--c);
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.3s, opacity 0.25s;
  opacity: 0.55;
}
.crb-avatar label:hover span { opacity: 0.85; }
.crb-avatar input:checked + span {
  opacity: 1; transform: scale(1.15);
  box-shadow: 0 0 0 3px #15151d, 0 0 0 5px var(--c), 0 0 18px var(--c);
}

.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…