JSFiddle - React, Tailwind, and code Playground

HTML

<div>
</div>

CSS

div {
    width: 100px;
    height: 100px;
    background: silver;
    transition: 1s;
}

div:active {
    background: yellow;
    transition: 0s;
}