Skip to content

Open source CapCut alternative.

TypeScript
1.2 KB
Raw Blame
/* Animations for the welcome sequence. Decorative only — every one of them
   stops under prefers-reduced-motion. */

/* The plans card's tape flutters once when the slide arrives, so the eye lands
   on the offer. Only the tilt moves; the tape's resting -2deg and its centering
   offset stay in the individual transform properties TapedCard sets. */
@keyframes onboarding-tape-shake {
  0% {
    rotate: -2deg;
  }
  12% {
    rotate: -13deg;
  }
  26% {
    rotate: 7deg;
  }
  40% {
    rotate: -10deg;
  }
  54% {
    rotate: 3deg;
  }
  68% {
    rotate: -6deg;
  }
  84% {
    rotate: -0.5deg;
  }
  100% {
    rotate: -2deg;
  }
}

.onboarding-tape-shake {
  animation: onboarding-tape-shake 700ms ease-in-out 250ms both;
}

/* The offer sticker lands with the same wobble and comes to rest tilted. */
@keyframes onboarding-sticker-shake {
  0% {
    rotate: 6deg;
  }
  20% {
    rotate: -6deg;
  }
  45% {
    rotate: 12deg;
  }
  70% {
    rotate: 2deg;
  }
  100% {
    rotate: 6deg;
  }
}

.onboarding-sticker-shake {
  rotate: 6deg;
  animation: onboarding-sticker-shake 700ms ease-in-out 250ms both;
}

@media (prefers-reduced-motion: reduce) {
  .onboarding-tape-shake,
  .onboarding-sticker-shake {
    animation: none;
  }
}