JSFiddle - React, Tailwind, and code Playground

by Johan Muller

HTML

<a href="#test">click me</a>
<a href="#test1">click me1</a>
<a href="#test2">click me2</a>
<a href="#test3">click me3</a>
<a href="#">close</a>

<div id="test" class="show_when_active">Hello1</div>
<div id="test1" class="show_when_active">Hello2</div>
<div id="test2" class="show_when_active">Hello3</div>
<div id="test3" class="show_when_active">Hello4</div>

CSS

.show_when_active {
    display: none;
}
.show_when_active:target {
    display: block;
}