JSFiddle - React, Tailwind, and code Playground
HTML
<p id="text">Click on me</p>
CSS
#text {
-webkit-transition:text-shadow 0.5s ease-in-out;
-moz-transition:text-shadow 0.5s ease-in-out;
-o-transition:text-shadow 0.5s ease-in-out;
-ms-transition:text-shadow 0.5s ease-in-out;
transition:text-shadow 0.5s ease-in-out;
text-shadow:10px 10px 2px #444;
}
#text.active {
text-shadow:-10px 10px 10px #444;
}
JavaScript
$(document).ready(function() {
$("#text").on("click", function() {
$(this).toggleClass("active");
});
});