JSFiddle - React, Tailwind, and code Playground
HTML
<div class="container">
<p class="circle">
test
</p>
</div>
CSS
.container {
width: 400px;
height: 200px;
background-color: #00a3a1;
}
.circle {
border-radius: 50%;
background-color: #fff;
}
JavaScript
var modWidth = $('.container').width();
$( ".circle" ).on( "click", function() {
$( this ).width( modWidth ).css( "width: 50px" );
modWidth -= 8;
});