<label class="switch">
  <input role="switch" type="checkbox" class="switch__input" />
  <span class="switch__bg"></span>
  <span class="switch__label">Power</span>
</label>

<style>
/* From Uiverse.io by Admin12121  - Tags: switch, toggle, toggle switch, 3d button */
.switch,
.switch__input {
  --hue: 223;
  --bg: hsl(var(--hue), 90%, 60%);
  --fg: hsl(var(--hue), 90%, 10%);
  --primary: hsl(var(--hue), 90%, 50%);
  --trans-dur: 0.3s;
  --trans-timing: cubic-bezier(0.65, 0, 0.35, 1);
  font-size: calc(40px