Sub topic 9
Choosing the right pattern
This chapter assumes you can already build the three patterns from earlier chapters: a hamburger menu with an accessible toggle, a bottom tab bar, and a priority menu. It also assumes you know basic flexbox, media queries, and semantic nav markup. Here the question changes from "how do I build it" to "which one should I build, and what does it cost me."
Why the choice matters
Each pattern trades visibility against space. A navigation link that is always on screen gets used. A link behind a button gets used less, because the user has to know it exists, tap to open, and then tap again. A pattern that shows everything uses space that content also wants.
So the decision is not about style. It follows from three facts about your site:
- How many top-level destinations there are.
- How much those destinations differ in importance.
- How often people move between them during one visit.
The three patterns compared
| Property | Hamburger menu | Bottom tab bar | Priority menu |
|---|---|---|---|
| Visible destinations | None until opened | All, always | As many as fit, then "More" |
| Sensible item count | Many (5 to 30+) | 3 to 5 | 4 to 8 |
| Taps to reach an item | 2 | 1 | 1 for visible, 2 for overflow |
| Screen space used | Very little (one button) | A fixed strip at the bottom | A strip at the top |
| Thumb reach | Poor if the button sits top corner | Good | Poor to fair |
| Needs JavaScript | Yes, for the toggle | No | Yes, to measure and move links |
| Main risk | Hidden destinations are forgotten | Too many items become cramped | Layout shifts as links move |
| Best for | Large or deep sites, secondary links | App-like products with a few core areas | Content sites with a few main sections |
Hamburger menu
The hamburger menu hides all links behind one button. It costs almost no space, and it scales to any number of links because the opened list can scroll.
The cost is discoverability. Users cannot see what the site offers until they open the menu. Items inside it get less use than items that stay on screen. The toggle is also usually in a top corner, which is the hardest area to reach with one thumb on a large phone.
Choose it when:
- You have more than about six destinations.
- The destinations are roughly equal in importance, or most are rarely used.
- Content needs the full screen and users mostly arrive on a page and read it.
Bottom tab bar
A tab bar keeps every top-level destination visible and one tap away. It sits where the thumb rests, and the active tab shows the user where they are. This is why it suits apps that people move around in repeatedly, such as shopping, banking, or messaging.
Its limit is width. A phone is about 360 to 430 CSS pixels wide. With a 48px minimum touch target and readable labels, five items is close to the ceiling, and four is more comfortable. Past that, labels truncate or targets shrink below a usable size.
Choose it when:
- You have three to five destinations that are all genuinely top-level.
- Users switch between them often.
- The product behaves like an application rather than a document.
Be careful with a fixed bar on pages that already have a fixed cookie banner, a chat widget, or a sticky checkout button. Several fixed elements at the bottom can leave very little room for content on a short screen.
Priority menu
A priority menu shows as many links as fit and moves the rest into a "More" disclosure. It adapts to the actual width, so it works on a narrow phone, a wide phone in landscape, and a tablet without separate designs.
It keeps the most important links visible, but only if you order the links by importance. The script moves links from the end of the list, so the last item is the first to disappear. The order in your markup is the priority order.
The costs are layout instability and a more complex script. Links can move when fonts load, when the window is resized, or when a label changes length. Which links are visible also differs between devices, so users on different screens may learn different layouts.
Choose it when:
- You have four to eight links with a clear priority order.
- The navigation sits in a top bar that you want to keep on every screen size.
- You do not want to maintain separate mobile and desktop navigation.
A decision process
Work through these questions in order. Stop at the first one that gives a clear answer.
- Count the top-level destinations. If there are two or three, you may not need a pattern at all. A row of links can fit on a phone. If there are 3 to 5, a tab bar is a candidate. If there are more than about 8, a hamburger menu is the realistic option.
- Rank them. If one or two links carry most of the traffic, keep those visible. A priority menu does this automatically. A tab bar does it by only holding the important ones.
- Ask how often users switch sections. Frequent switching favors a tab bar. Arriving at a page, reading, and leaving favors a hamburger menu or priority menu.
- Check the thumb. Look at where the main controls sit. Frequent actions belong in the lower half of the screen where a thumb reaches without a grip change.
- Check what else is fixed on screen. Count fixed headers, footers, banners, and floating buttons. Navigation must not fight them for space.
The diagram below shows the same process as a flow.
Edge cases and failure modes
Counts that sit on the boundary
Five items is a boundary for tab bars. If your site has five items today and a product team that will add a sixth next quarter, a tab bar will break. Pick a pattern that tolerates growth, or decide now which item the sixth will replace.
Labels that are longer than they look
A label such as "Notifications" in a 360px-wide, five-tab bar leaves about 72px per tab. At a normal font size the word is wider than that in many languages once translated. Test with your longest translation, not with English alone. If labels do not fit, use fewer tabs or shorter words. Do not shrink the text below readable size.
Icons without labels
Icon-only tabs save width but cost clarity. Few icons are understood universally. Keep a text label on every tab unless the icon is a well-known one with an accessible name added by aria-label or visually hidden text.
Hiding the most important link
Putting "Cart" or "Sign in" inside a hamburger menu on a commerce site hides the action that earns money. A common fix is to keep one or two high-value actions visible next to the toggle and place the rest in the menu.
Priority menus and focus order
When the script moves a link into the "More" list, it also changes tab order and screen reader order. This is acceptable because the overflow list follows the main list in the DOM. It becomes a problem if you add CSS order or absolute positioning that makes the visual order differ from the DOM order. Keep them aligned.
Priority menus and first paint
The script runs after the page loads, so the user may see all links briefly overflowing before the script moves some. Setting overflow: hidden and white-space: nowrap on the list, as the earlier example does, prevents visible spill. Even so, a small shift can appear. If it is noticeable, reserve the nav height in CSS so the page below does not jump.
Treating a pattern as a visual choice
All three patterns should be built on the same semantic nav markup. If you can only meet a design by replacing the links with div elements, the design has become the problem, not the markup.
Using data to decide
If you have analytics, two measurements help.
- Click share per link. If three links receive most of the clicks, those three are your visible set.
- Navigation depth per session. If sessions often visit several sections, that favors always-visible navigation. If most sessions are a single page, hiding navigation costs little.
If you have no data, start with the simplest pattern that fits your item count and run a task-based test: ask five people to find three specific pages and watch where they hesitate. A tester who taps around the screen before finding the menu is a stronger signal than any rule in this chapter.
Worked example
A bookshop site has these top-level destinations: Home, Browse, Search, Cart, Account, Events, Blog, About, Shipping, and Contact. Analytics show Browse, Search, and Cart carry about 80 percent of navigation clicks, and a typical session visits three sections.
- Count. Ten destinations is too many for a tab bar or a priority menu.
- Rank. Three links are heavy-use. The other seven are occasional.
- Switching. Sessions visit several sections, so the heavy-use links should stay visible.
- Thumb. Browse, Search, and Cart are used repeatedly, so they belong at the bottom.
- Fixed elements. The site has a cookie banner at first visit only, so a bottom bar is safe afterward.
The result is a tab bar with Home, Browse, Search, and Cart, plus a fifth tab labeled "Menu" that opens the remaining pages as a hamburger-style list. This mixes two patterns, which the next chapter covers. Choosing it came directly from the questions above: the count ruled out a single simple pattern, and the ranking told us which links to promote.
Common mistakes
- Choosing by appearance instead of by item count and usage.
- Putting more than five items in a tab bar.
- Hiding the single most-used action in a hamburger menu.
- Ordering links by internal org chart instead of by importance, which makes the priority menu hide the wrong ones.
- Testing only on a resized desktop browser, which does not show thumb reach or safe-area behavior.
- Forgetting that the choice has to hold for tablets and desktops as well. The pattern may change at a breakpoint, and that change needs a plan.
Exercise
A news site has seven top-level sections: Top stories, World, Local, Sport, Opinion, Video, and Newsletter. Analytics show that 70 percent of visits are a single article, and Top stories and Local get most of the section clicks. Which pattern would you pick, and what one change would you make to avoid hiding the most-used links?
Show answer
A hamburger menu or a priority menu fits, and a tab bar does not because seven items exceed the practical limit of five and most visits are a single article, not repeated switching. A priority menu is the better fit if the sections are listed in priority order, with Top stories and Local first, so they stay visible and the rest move to "More." If you choose a hamburger menu instead, keep Top stories and Local visible next to the toggle so the most-used links are not hidden behind it.
Exercise
Your tab bar has five tabs and works at 390px wide. A translated version needs a label that is wider than its tab at 360px. Name two ways to fix this without shrinking the text below readable size, and say which one you would try first.
Show answer
Shorten the label, or reduce the number of tabs by moving the least-used one into a "More" or menu tab. Try the shorter label first because it keeps the structure the same. If a shorter word does not fit across all languages, reduce the tab count to four, which also gives each target more width.