JSFiddle - React, Tailwind, and code Playground
by parkji
HTML
<div class="not-active"></div>
CSS
.not-active {
border: 20px solid #000;
border-top: 20px solid transparent;
border-bottom: 20px solid transparent;
border-right: 0;
width: 0px;
margin: 50px;
-webkit-transition: all 0.5s ease-in;
}
.active {
-webkit-transform: rotate(90deg);
}
JavaScript
$('.not-active').click(function() {
$(this).toggleClass('active');
});