JSFiddle - React, Tailwind, and code Playground

HTML

<div class="test"></div>

CSS

.test {
  width: 100px;
  height: 100px;
  background-color: #f00;
  animation-name: wiggle, wiggle;
  animation-duration: 2s, 1s;
  animation-delay: 0s, 2s;
}

@keyframes wiggle {
  0% {
    transform: translateX(0px);
  }
  50% {
    transform: translateX(100px);
  }
  100% {
    transform: translateX(0px);
  }
}