Baktiyar Ablaikhan

Svg

Source
Uiverse ↗
Author
ilkhoeri
Licence
MIT

Loading…

Code

<button class="action_has has_saved" aria-label="save" type="button">
  <svg
    aria-hidden="true"
    xmlns="http://www.w3.org/2000/svg"
    width="20"
    height="20"
    stroke-linejoin="round"
    stroke-linecap="round"
    stroke-width="2"
    viewBox="0 0 24 24"
    stroke="currentColor"
    fill="none"
  >
    <path
      d="m19,21H5c-1.1,0-2-.9-2-2V5c0-1.1.9-2,2-2h11l5,5v11c0,1.1-.9,2-2,2Z"
      stroke-linejoin="round"
      stroke-linecap="round"
      data-path="box"
    ></path>
    <path
      d="M7 3L7 8L15 8"
      stroke-linejoin="round"
      stroke-linecap="round"
      data-path="line-top"
    ></path>
    <path
      d="M17 20L17 13L7 13L7 20"
      stroke-linejoin="round"
      stroke-linecap="round"
      data-path="line-bottom"
    ></path>
  </svg>
</button>
Prompt

Build "Svg", a button animation. Write it as plain HTML and CSS: one container element and a stylesheet, no JavaScript unless it is essential. Technique: CSS keyframes, inline SVG. 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/ilkhoeri/chilly-sloth-36 (ilkhoeri, MIT).