Sub topic 9
Choosing the right pattern
This chapter assumes you can build the three patterns from the earlier chapters: the hamburger menu, the bottom tab bar, and the priority menu. It also assumes you know basic flexbox, media queries, and the aria-expanded attribute. Here you decide which pattern fits a given site, and why.
Three questions that decide the pattern
No pattern is best everywhere. Each one trades visibility against space. Three questions narrow the choice quickly.
- How many top-level destinations are there? Count the items that must be reachable from every page.
- How important are they? Ask whether users need them constantly or only now and then.
- How often are they used? A destination used in most sessions should not sit behind a tap.
The number of items is the first filter, because each pattern has a physical limit.
| Pattern | Comfortable item count | Visibility | Main cost |
|---|---|---|---|
| Bottom tab bar | 3 to 5 | Always visible | Little room for more items |
| Priority menu | 4 to about 8 | Most important items visible | Items move around as width changes |
| Hamburger menu | 5 or more | Hidden until opened | An extra tap, and less discovery |
Why a tab bar needs few items
A tab bar splits the screen width evenly. On a 360px-wide phone, five tabs leave 72px each. That fits an icon and a short label. Six tabs leave 60px, and labels start to wrap or shrink. Keep the tab bar to five at most. If you need more, put the extra items on an "Account" or "More" screen.
A tab bar also suits apps where users switch between a few equal sections many times per session. Typical examples are a shop (Home, Search, Orders, Account) and a messaging tool. Its permanent position means the user always knows where they are, which aria-current="page" also tells assistive technology.
When the hamburger menu fits
A hamburger menu keeps the screen clear by hiding every link behind one button. That makes it a good fit when:
- the site has many destinations, such as a documentation site or a large store with deep categories;
- most visits begin on a content page, and navigation is secondary to reading;
- the links are mostly infrequent, such as "Contact", "Careers", or "Terms".
The cost is discoverability. Users cannot see what is in the menu, so they use hidden items less often. Do not hide your most-used destinations behind it if they matter to the business.
When the priority menu fits
A priority menu shows as many links as fit and moves the rest into "More". It suits a site with a modest set of links where the first two or three are clearly the most important, such as Products, Pricing, and Docs. It works well on tablets and small laptops, where a full list almost fits.
It has two weak points on phones. The links that remain visible depend on the screen width, so two users may see different menus. The "More" button also hides links in the same way a hamburger does. On a narrow phone, a priority menu often shows only one or two links, and then a hamburger is simpler and more predictable.
A short decision flow
Use this flow as a starting point. Content you can test, such as analytics showing which links users click, should override it.
Worked example
Take a bakery site with five links: Menu, Order, Locations, About, and Contact. Most visitors want Menu and Order, and a few want Locations. About and Contact are rarely used.
- Five items are within the tab bar limit, but only three are used often. A tab bar would give the same space to About and Contact as to Order.
- A priority menu would show Menu and Order first and move the rest into "More". On a phone it might show only those two.
- A hamburger menu would hide Menu and Order, the two links that bring in money.
The best result here is a tab bar with three tabs (Menu, Order, Locations) and About and Contact placed in the page footer. The decision rested on usage, not on the raw count of five.
Common mistakes
- Choosing by habit. A hamburger on every site is common, and it often hides the links users need most.
- Counting items but ignoring usage. Five equal-looking links are rarely used equally.
- Mixing two patterns on one screen without a reason. A tab bar plus a hamburger that repeats the same links gives users two places to look.
- Ignoring touch size. Whatever you choose, each target still needs at least 48px of height, as covered in the touch targets chapter.
Exercise
A travel-booking site has four top-level destinations: Flights, Hotels, Trips, and Profile. Users move between them many times in one session. Which pattern fits best on a phone, and why would a hamburger menu be a weaker choice?
Show answer
A bottom tab bar fits best. Four items are within the 3 to 5 limit, they are all used often, and a tab bar keeps them visible and reachable by the thumb. A hamburger menu would hide frequently used destinations behind an extra tap and reduce discoverability.
Exercise
A documentation site has 14 top-level sections, and most visitors arrive on an article from a search engine. Which pattern fits best on a phone, and why do the other two fail?
Show answer
A hamburger menu fits best. Visitors mostly read, so navigation is secondary, and 14 items is too many to show. A tab bar supports at most about five items, and a priority menu on a narrow phone would show only one or two links and hide the rest in "More".