Patterns

Navigation

How the navigation components fit together. Each has its own page; this page is about choosing between them and keeping people oriented.

Which one to use

The user needs to…UseWhy
Move between the main sections of the siteNav barAlways in the same place, shows where you are.
Switch between views of the same content on one pageTabsThe page does not change, only what is shown.
Open a larger destination with a title and a descriptionNav cardThe whole card is the link, a big target.
Do a small action or open a tool (close, search, theme)Icon buttonCompact, for universal icons only.
Go somewhere from inside a sentenceText linkNot a component: underlined olive text.
Why

People need to answer three questions at any moment: where am I, where can I go, and what does this control do. Navigation controls always show the current place (underline, selected state) and always look different from actions (buttons), so you never wonder whether something moves you or changes something.

How it is built

AtomsIcon button, Tab
MoleculesTabs, Nav card
OrganismNav bar (brand + links + icon buttons)

Keeping people oriented

QuestionAnswer
Where am I?The current link is underlined and marked aria-current="page". Tabs show the selected tab.
Where can I go?The nav bar lists the main sections, and nav cards offer the next steps on a page.
What will this do?Links go somewhere, buttons do something, tabs change the view. They never swap roles.

Web and mobile

TopicWebMobile
Main navigationLinks in a row at the top.Collapsed behind a Menu button below 768px.
HoverUsed for extra feedback only.None. Never hide navigation behind hover.
Targets44px tall.44px tall.
TabsAll tabs in a row.Scroll sideways if they do not fit. Keep to three or four.
Nav cardsTwo or three across.One column, full width.

Accessibility

Rules

RuleReason
Five or fewer links in the main bar.More than five and people stop reading them.
Short noun labels, sentence case.Scannable and predictable.
Tabs for views, links for pages.Different keyboard and browser behavior.
Don\'t use a button for navigation or a link for an action.Right element, right behavior.
Don\'t hide navigation behind hover.There is no hover on a phone.