JSFiddle - React, Tailwind, and code Playground
HTML
<div id="block" style="width: 200px; height: 150px; background-color: blue"></div>
<span id="click">hide</span>
JavaScript
$("#click").toggle(
function(){
$("#block").slideUp();
$(this).html('show');
},
function(){
$("#block").slideDown();
$(this).html('hide');
});