Primer comes with several navigation components. Some were designed with singular purposes, while others were design to be more flexible and appear quite frequently.
## Contents
* Will be replaced with the ToC, excluding the "Contents" header
{:toc}
## Menu
The menu is a vertical list of navigational links. **A menu's width and placement must be set by you.** If you like, just use our grid columns as a parent. Otherwise, apply a custom `width`.
{% example html %}
<navclass="menu">
<aclass="menu-item selected"href="#">Account</a>
<aclass="menu-item"href="#">Profile</a>
<aclass="menu-item"href="#">Emails</a>
<aclass="menu-item"href="#">Notifications</a>
</nav>
{% endexample %}
There are a few subcomponents and add-ons that work well with the menu, including avatars, counters, and Octicons.
{% example html %}
<navclass="menu">
<aclass="menu-item selected"href="#">
<spanclass="octicon octicon-tools"></span>
Account
</a>
<aclass="menu-item"href="#">
<spanclass="octicon octicon-person"></span>
Profile
</a>
<aclass="menu-item"href="#">
<spanclass="octicon octicon-mail"></span>
Emails
</a>
<aclass="menu-item"href="#">
<spanclass="octicon octicon-radio-tower"></span>
<spanclass="counter">3</span>
Notifications
</a>
</nav>
{% endexample %}
You can also add optional headings to a menu. Feel free to use nearly semantic element with the `.menu-heading` class, including inline elements, headings, and more.
{% example html %}
<navclass="menu">
<spanclass="menu-heading">Menu heading</span>
<aclass="menu-item selected"href="#">Account</a>
<aclass="menu-item"href="#">Profile</a>
<aclass="menu-item"href="#">Emails</a>
<aclass="menu-item"href="#">Notifications</a>
</nav>
{% endexample %}
## Tabnav
When you need to toggle between different views, consider using a tabnav. It'll given you a left-aligned horizontal row of... tabs!
{% example html %}
<divclass="tabnav">
<navclass="tabnav-tabs">
<ahref="#"class="tabnav-tab selected">Foo tab</a>
<ahref="#"class="tabnav-tab">Bar tab</a>
</nav>
</div>
{% endexample %}
Use `.right` to align additional elements in the `.tabnav`:
{% example html %}
<divclass="tabnav">
<aclass="btn btn-sm right"href="#">Button</a>
<navclass="tabnav-tabs">
<ahref="#"class="tabnav-tab selected">Foo Tab</a>
<ahref="#"class="tabnav-tab">Bar Tab</a>
</nav>
</div>
{% endexample %}
Additional bits of text and links can be styled for optimal placement with `.tabnav-extra`:
A vertical list of filters. Grey text on white background. Selecting a filter from the list will fill its background with blue and make the text white.