JSFiddle - React, Tailwind, and code Playground
HTML
<div id="toggler">
<div id="title">Something</div>
<div id="content"><p>Content here :)</p></div>
</div>
CSS
#content {
display: none;
}
#title {
cursor: hand;
}
.active {
color: red;
}
JavaScript
$('#title').click(function() {
$(this).addClass('active');
$('#content').toggle();
}), function() {
$(this).removeClass('active');
};