JSFiddle - React, Tailwind, and code Playground

HTML

<button id="afficheMasque">Afficher</button>
<div id="text">
     Ici le text à montrer ou à cacher
</div>

CSS

#text {
    background:yellow;
    display:none;
}

JavaScript

$("#afficheMasque").click(function() {
    if ($("#text").css('display') == "none" ) {
		$("#text").slideDown(400);
		$('#afficheMasque').html("Cacher");
	} else {
		$("#text").hide(400);
		$('#afficheMasque').html("Afficher");
	}
});