JSFiddle - React, Tailwind, and code Playground

HTML

<div>

</div>

CSS

@keyframes taille {
    0% {width: 50px}
    100% {width: 200px}
}
div {
    height: 100px;
    background-color: blue;
    animation-name: taille;
    animation-duration: 4s;
    animation-fill-mode: forwards;
    animation-iteration-count: infinite;
    animation-direction: alternate;
    animation-timing-function: linear;
    animation-play-state: paused;
}
div:hover {
    animation-play-state: running;
}