JSFiddle - React, Tailwind, and code Playground

by will

HTML

<div class="element">
   
<p>Testing text</p>

</div>

CSS

.element {
    width:100px;
    background: grey;
    padding:20px;
}

JavaScript

$('.element').click(function(){
    
    $('.element').css({
        'width':    $(this).width() * 2
    });
    
});