JSFiddle - React, Tailwind, and code Playground
HTML
<label><input type='checkbox' class='anistop'><span>anistop</span></label>
<div class='block'></div>
CSS
.block {
width: 10em;
height: 10em;
background: gray;
margin: 20px;
animation: rotate 10s infinite linear;
}
@keyframes rotate {
100% {
transform: rotateY(360deg);
}
}
JavaScript
$('.anistop').click(function() {
$('.block').stop();
});