AI CSS Animations

Cat Paw Checkbox

A ginger paw reaches down from above, presses the box flat and pulls back, leaving a paw print where the checkmark would be. The arm slides inside a clipped window, so it never covers your layout.

Also known as: cute checkbox css, paw print checkbox, cat checkbox animation.

HTML

<label class="chk-cat-paw">
  <input type="checkbox">
  <span class="chk-cat-paw-slot">
    <span class="chk-cat-paw-box"><svg class="chk-cat-paw-print" viewBox="0 0 24 24" aria-hidden="true"><ellipse cx="12" cy="15.8" rx="4.6" ry="3.7"/><circle cx="6.4" cy="10.4" r="1.9"/><circle cx="9.9" cy="7" r="1.9"/><circle cx="14.1" cy="7" r="1.9"/><circle cx="17.6" cy="10.4" r="1.9"/></svg></span>
    <span class="chk-cat-paw-reach" aria-hidden="true"><span class="chk-cat-paw-arm"><i></i><i></i><i></i><b></b></span></span>
  </span>
  <span class="chk-cat-paw-text">Feed the cat</span>
</label>

CSS

.chk-cat-paw {
  --c: var(--chk-color, #3b82f6);
  font-size: var(--chk-size, 24px);
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  line-height: 1.3;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  gap: 0.7em;}
.chk-cat-paw input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
}
.chk-cat-paw-slot {
  position: relative;
  flex: none;
  width: 1.35em;
  height: 1.35em;
}
.chk-cat-paw-box {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0.12em solid color-mix(in srgb, currentColor 38%, transparent);
  border-radius: 0.35em;
  transform-origin: 50% 100%;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.chk-cat-paw-print {
  width: 0.95em;
  height: 0.95em;
  fill: #fff;
  transform: scale(0);
  transition: transform 0.15s ease-in;
}
.chk-cat-paw-reach {
  position: absolute;
  left: 50%;
  bottom: 40%;
  width: 1.3em;
  height: 2.6em;
  margin-left: -0.65em;
  overflow: hidden;
  pointer-events: none;
}
.chk-cat-paw-arm {
  position: absolute;
  left: 0.15em;
  right: 0.15em;
  bottom: 0;
  height: 2.4em;
  border-radius: 0.5em;
  background:
    repeating-linear-gradient(180deg, transparent 0 0.32em, rgb(146 64 14 / 0.25) 0.32em 0.44em) 0 0 / 100% 55% no-repeat,
    #f4a259;
  transform: translateY(-110%);
}
.chk-cat-paw-arm i,
.chk-cat-paw-arm b {
  position: absolute;
  border-radius: 50%;
  background: #f9a8d4;
}
.chk-cat-paw-arm i {
  bottom: 0.5em;
  width: 0.2em;
  height: 0.24em;
}
.chk-cat-paw-arm i:nth-child(1) {
  left: 0.12em;
}
.chk-cat-paw-arm i:nth-child(2) {
  left: 0.4em;
  bottom: 0.6em;
}
.chk-cat-paw-arm i:nth-child(3) {
  left: 0.68em;
}
.chk-cat-paw-arm b {
  left: 50%;
  bottom: 0.12em;
  width: 0.5em;
  height: 0.36em;
  margin-left: -0.25em;
}
.chk-cat-paw-text {
  transition: color 0.25s ease 0.4s;
}
.chk-cat-paw input:checked ~ .chk-cat-paw-text {
  color: var(--c);
}
.chk-cat-paw:hover .chk-cat-paw-box {
  border-color: var(--c);
}
.chk-cat-paw input:checked + .chk-cat-paw-slot .chk-cat-paw-box {
  background: var(--c);
  border-color: var(--c);
  transition-delay: 0.36s;
  animation: chk-cat-paw-squash 1s ease-out;
}
.chk-cat-paw input:checked + .chk-cat-paw-slot .chk-cat-paw-print {
  transform: scale(1);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) 0.55s;
}
.chk-cat-paw input:checked + .chk-cat-paw-slot .chk-cat-paw-arm {
  animation: chk-cat-paw-press 1s cubic-bezier(0.45, 0, 0.3, 1);
}
.chk-cat-paw input:focus-visible + .chk-cat-paw-slot .chk-cat-paw-box {
  outline: 0.12em solid var(--c);
  outline-offset: 0.18em;
}
@keyframes chk-cat-paw-press {
  0% { transform: translateY(-110%) scaleY(1); }
  32% { transform: translateY(0) scaleY(1); }
  42% { transform: translateY(0.08em) scaleY(0.94); }
  62% { transform: translateY(0) scaleY(1); }
  100% { transform: translateY(-110%) scaleY(1); }
}
@keyframes chk-cat-paw-squash {
  0%, 32% { transform: scale(1); }
  42% { transform: scale(1.08, 0.8); }
  58% { transform: scale(0.97, 1.04); }
  72%, 100% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .chk-cat-paw, .chk-cat-paw *, .chk-cat-paw::before, .chk-cat-paw::after, .chk-cat-paw *::before, .chk-cat-paw *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

Customizing this snippet

  • Color: set --chk-color on the element or a parent. Currently previewing #3b82f6.
  • Size: set --chk-size. Every other dimension is in em, so the whole thing scales together. Currently previewing 24px.
  • Speed: change the duration on the transition or animation shorthand. Staggered delays are relative, so they keep their rhythm.
  • Reduced motion: the rule at the end of the CSS turns the motion off for people who asked their OS for less of it. Keep it.

Similar checkboxes