Tabs

tabbed navigation component for multiple panels

It’s tabbed navigation. No JavaScript required.

1
2
3
4
5
6
7
8
9
<div class="tabs">
{%- for _, o := range []string{"Alpha", "Beta", "Gamma", "Delta", "Epsilon"} -%}
<input name="type" type="radio" id="tab-{%s o %}" class="input"/>
<label for="tab-{%s o %}" class="label">{%s o %}</label>
<div class="panel">
<p>This is a tab named {%s o %}</p>
</div>
{%- endfor -%}
</div>