Interruptor (checkbox)

Interruptor (checkbox): botón en CSS. Copia las reglas, o el prompt que reproduce el resultado.

toggleswitchcheckboxpill

CSS
.btn-086 {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 500 14px/1 system-ui,sans-serif;
  color: #111827;
  cursor: pointer;
  user-select: none
}
.btn-086 input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0
}
.btn-086 span {
  position: relative;
  width: 44px;
  height: 24px;
  background: #d1d5db;
  border-radius: 999px;
  transition: background .2s
}
.btn-086 span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,.3);
  transition: transform .2s
}
.btn-086 input:checked+span {
  background: #16a34a
}
.btn-086 input:checked+span::after {
  transform: translateX(20px)
}
.btn-086:hover span {
  background: #9ca3af
}
.btn-086:hover input:checked+span {
  background: #15803d
}
.btn-086 input:focus-visible+span {
  outline: 2px solid #16a34a;
  outline-offset: 2px
}
.btn-086:active span::after {
  width: 22px
}
HTML
<label class="btn-086"><input type="checkbox"><span></span>Notifications</label>
Prompt

Un interruptor construido a partir de un checkbox oculto: una pista tipo píldora gris #d1d5db de 44px por 24px con un mando blanco de 18px (inset de 3px, sombra pequeña). Al marcarse la pista se vuelve verde #16a34a y el mando se desliza 20px a la derecha (200ms). Al pasar el cursor la pista se oscurece; mientras se pulsa, el mando se estira a 22px. Texto de la etiqueta de 14px de peso medio a la derecha. Outline de foco de 2px verde.