Navigation
Tabs, Navigation Menu, Sidebar, Breadcrumb, Pagination, Menubar and Dropdown Menu, and the line between taking the reader somewhere and doing something for them.
Navigation moves the reader to another place. Actions change something where they are. The two often look alike, a list of words behind a button, but they are built differently, announced differently and expected to behave differently. Most navigation mistakes come from mixing them up.
A quick test: if the item could be a link you open in a new tab, it is navigation. If it makes sense only on the current screen, it is an action.
Decision table
| Component | Moves the reader to | Changes the URL | Use it for |
|---|---|---|---|
| Sidebar | The main sections of an app | Yes | The app shell of a dashboard or tool |
| Navigation Menu | Top level pages and groups of links | Yes | The header of a site, with panels of links |
| Breadcrumb | Any level above the current page | Yes | Deep hierarchies, three levels or more |
| Pagination | Another page of the same list | Yes, ideally | Long lists where position matters |
| Tabs | Another view of the same thing | Usually not | Sections of one object, switched in place |
| Dropdown Menu | Nowhere. It runs actions | No | Actions on one object: rename, duplicate, delete |
| Context Menu | Nowhere. It runs actions | No | Shortcuts for actions that also exist elsewhere |
| Menubar | Nowhere. It runs commands | No | Desktop style apps: editors, design tools |
Menus are for actions
Dropdown Menu, Context Menu and Menubar render the WAI-ARIA menu pattern. A screen reader announces "menu" and each item as a command. Arrow keys move between items, typing jumps to them, and the menu closes after a pick. That is the right contract for "do something to this", and the wrong one for "take me there".
acme-web
Updated 2 hours ago
- Group items and put destructive ones last, after a separator. Mark them with
variant="destructive". - Never make a Context Menu the only way to reach an action. Right click and long press are invisible until someone thinks to try them.
- A Menubar is for apps that feel like desktop software, with File, Edit and View. On a website it is out of place and most readers do not know how to use it.
- The shortcut hints in menus are text. Wire the actual keyboard shortcuts yourself, or leave the hint out.
Tabs switch views in place
Tabs show different views of the same thing on the same page: the overview, logs and settings of one deployment. The panels are all there, the URL usually stays the same, and switching is instant.
Ready in 42s. Serving production from iad1.
The landing page, rendered inside a tab panel.
If each view deserves its own URL, it is navigation. Render real links styled to look like tabs and mark the current one with
aria-current="page", instead of using the Tabs component.Keep tabs to one row. When they start wrapping or scrolling, there are too many, and some of them want to be pages.
Sidebar and Navigation Menu
These are the two shells. A Sidebar holds the main sections of an app the reader works in every day: it stays visible, shows where they are with
aria-current, collapses to an icon rail and turns into a Sheet on small screens. A Navigation Menu is the header of a site people visit: a row of top level links, some of which open a panel of more links on click.Use one primary shell per product. A sidebar and a header that both list the same sections make the reader wonder which one is the real one.
Breadcrumb and Pagination
A Breadcrumb shows where the current page sits in a hierarchy and lets the reader go up. It is not a history of where they came from.
- Use it when the hierarchy is three levels deep or more. On a two level app it repeats what the sidebar already says.
- The last item is the current page, rendered with
Breadcrumb.Page, not a link. - Collapse the middle with
Breadcrumb.Ellipsiswhen the trail gets long, never the first or last item.
Pagination splits a long list into pages. It works best when the page lives in the URL (
?page=3) so it survives a reload and can be shared. Prefer it over infinite scroll when people need to find their place again, compare results or reach the footer.Found something to improve?
Notice a bug, typo, or missing detail on this page? Help us make the documentation better by opening a GitHub issue.