JSFiddle - React, Tailwind, and code Playground
HTML
<body>
<img src="http://placehold.it/250x250&text=Darth+Vader+Yo!" />
<p class="spoiler">
<!--Spoiler:-->
<span>Darth Vader is Luke Skywalker's Father! Noooooooooooo!</span>
</p>
</body>
CSS
.spoiler > span {
display: none;
}
JavaScript
//1. Hide spoiler
$(".spoiler span").hide();
//2. Add a button
$(".spoiler").append("<button>Reveal Spoiler!</button>");
//3. When button is pressed
$("button").click(function(){
//3.1 Show the spoiler
$(".spoiler span").show();
//3.2 Get rid of button
$(this).remove();
});