Baktiyar Ablaikhan

Realistic

Source
Uiverse ↗
Author
Praashoo7
Licence
MIT

Loading…

Code

<div class="main">
<label class="switch">
  <input type="radio" name="value-radio">
  <div class="button">
    <div class="light"></div>
    <div class="dots"></div>
  </div>
</label>
<label class="switch1">
  <input type="radio" checked="" name="value-radio">
  <div class="button">
    <div class="light"></div>
    <div class="dots"></div>
  </div>
</label>
<label class="switch2">
  <input type="radio" name="value-radio">
  <div class="button">
    <div class="light"></div>
    <div class="dots"></div>
  </div>
</label>
<div class="back"></div>
</div>
Prompt

Build "Realistic", a toggle animation. Write it as plain HTML and CSS: one container element and a stylesheet, no JavaScript unless it is essential. Technique: CSS keyframes. It sits on a light background, in a 16:10 frame. Respect prefers-reduced-motion with a still state, pause work when the element is off screen, and keep it accessible. Original: https://uiverse.io/Praashoo7/mean-dodo-99 (Praashoo7, MIT).