Web Design & UI/UX9 min read

Sidebar vs Tab Bar: Which Navigation Should Your App Use?

A sidebar fits an app on a laptop with many places. A tab bar fits a phone app with three to five. Both rebuilt on the same screens, three mistakes, the tablet case, a decision table and the CSS.

By Boone
XLinkedIn
Sidebar vs Tab Bar: Which Navigation Should Your App Use?

A sidebar and a tab bar do the same job: they show the main places in an app and mark the one you are in. What separates them is how much room the screen has and how many places there are. Below: both on the same screens, when each one is right, three mistakes, the tablet case, a decision table and CSS that switches between them.

The two questions that decide it

Ask how wide the screen is, then count the top places in the app. A wide window can spare a column, and a long list of places needs one. A narrow window cannot spare it, so the places go along the bottom and the list has to stay short.

Here are the same four places, Home, Search, Inbox and Profile, built both ways.

A laptop window with a left sidebar listing Home, Search, Inbox and Profile, Home highlighted, next to a task list that reads Good morning, Ana
A phone screen with the same task list and a bottom tab bar holding Home, Search, Inbox and Profile, Home highlighted

The content is the same. The laptop gives up a strip of width it can afford. The phone keeps its full width and gives up a strip of height at the bottom, close to the thumb.

When a sidebar is right

A work app on a laptop with a sidebar for a workspace called Fernhill: Inbox, My issues and Views, then three teams and three projects, beside a list of issues
  • The app runs on a laptop, or a tablet with room to spare. Apple's own warning is that a sidebar "requires a large amount of vertical and horizontal space."
  • There are more than five places. Nielsen Norman Group's case for left side navigation on desktop is that it fits many top level categories and is easy to scan.
  • People add their own. Teams, projects and channels pile up, and a vertical list takes one more row without a redesign. Slack lets people on paid plans sort theirs into custom sidebar sections, and Notion's sidebar lets people nest pages inside pages.

Keep it shallow where you can. Apple suggests showing no more than two levels of hierarchy in a sidebar, and not hiding the sidebar by default, so people can still find it.

Where it fails: on a narrow screen, where the column takes the width the content needs.

When a tab bar is right

A podcast app on a phone listing four shows, with a bottom tab bar holding Home, Search, Library and Profile
  • It is an app on a phone. On iPhone the tab bar sits at the bottom of the screen, and Android uses its navigation bar for compact windows.
  • It has three to five top places. Android's guidance is "three to five destinations of equal importance."
  • People switch between them all day. Apple says tab bars let people move between sections "while preserving the current navigation state within each section."

Keep it on screen as people move between sections, which Apple asks for so they do not forget where they are. A modal sheet can cover it, because a modal is temporary. Apple's own example of a tab bar is the Clock app, with Alarm, Stopwatch and Timer as tabs.

Where it fails: with too many places, or as a home for actions. Apple's rule is to use a tab bar for navigation, not for actions. If your row of options only changes the view on one screen, that is a segmented control, covered in tab bar vs segmented control.

Mistake 1: a sidebar squeezed onto a phone

Wrong: a sidebar that never leaves

A phone screen where a sidebar takes the left side and the show names beside it wrap onto two lines and get cut off

Right: a tab bar at the bottom

The same shows at full width with full names, episode details and play buttons above a tab bar

Our sidebar is 150 points wide on a 390 point screen, which is more than a third of it. The show names break onto two lines, one gets cut off, and the episode details and play buttons are gone. The tab bar hands all of that width back.

Mistake 2: a phone tab bar stretched across a laptop

Wrong: four tabs spread along the bottom

A wide window with four tabs spaced far apart along the bottom edge under a task list

Right: the same four in a sidebar

The same window with Home, Search, Inbox and Profile grouped in a left sidebar beside the task list

A bar built for a thumb makes little sense under a mouse. The four items drift apart across the whole width, and each new place has to squeeze into the same row. Android's guidance is blunt about it: do not use a bottom navigation bar on large screen sizes.

Mistake 3: eight places in one tab bar

Wrong: eight tabs

A phone tab bar crammed with eight items, two of them with labels cut off to Downl and Settin

Right: four tabs, the rest one level down

A Library screen listing Queue, Downloads, History and Saved as rows, above a tab bar with Home, Search, Library and Profile

Eight tabs on a 390 point screen get under 50 points each, and two labels no longer fit. On the right, four tabs stay. Queue, Downloads, History and Saved become rows inside Library, and Settings moves behind Profile.

Letting the system handle the overflow is not much better. UIKit's tab bar controller, given six or more tabs, shows the first four plus a More item, and Apple's guidelines warn that the More tab makes hidden sections harder to reach and notice.

What about a tablet?

A tablet sits between the two, and both platforms treat it that way.

  • iPad: the system shows the tab bar near the top of the screen. Apple says to prefer a tab bar for navigation, and if the app is more complex, to let it convert into a sidebar.
  • Android: the bottom navigation bar turns into a navigation rail, a narrow column of icons down the side, on large screens.

So start with the tab bar that adapts. Open straight into a sidebar when the app is mostly a list of places people manage themselves, like a mail or project tool used in landscape.

SituationPickWhy
Phone app with Home, Search, Inbox, ProfileTab barFour top places, within reach of the thumb
Laptop work app with teams and projectsSidebarThe list grows as people add to it
Phone app with eight placesTab bar, four or five tabsGroup the rest inside those tabs
Documentation site on a laptopSidebarMany pages that people scan and jump between
iPad app with a few sectionsTab barApple suggests trying it first
iPad app with many sectionsTab bar that converts to a sidebarA wider set of places when people want it
Android tablet app with four placesNavigation railA bottom bar is for compact windows
Compose, Share or AddNeitherAn action belongs in a button or toolbar
Day, Week, Month on one calendarSegmented controlIt changes the view, not the place

For the other patterns, from top bars to command palettes, see our navigation design patterns.

One app, both layouts

On the web, one list of links can be both. We borrow Android's window widths, 600 and 840, as CSS breakpoints: a bottom bar below 600 pixels, a rail from 600, a full sidebar from 840. The 72, 80 and 240 pixel sizes are our own.

css
/* markup: <nav class="app-nav"><a><svg/> <span>Home</span></a>...</nav> <main>...</main> */ .app-nav { position: fixed; left: 0; right: 0; bottom: 0; display: flex; box-sizing: border-box; height: calc(72px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: #F5F5F7; } .app-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; } main { padding-bottom: calc(72px + env(safe-area-inset-bottom)); } @media (min-width: 600px) { /* rail */ .app-nav { top: 0; right: auto; width: 80px; height: auto; flex-direction: column; padding: 16px 0; } .app-nav a { flex: none; height: 64px; } main { margin-left: 80px; padding-bottom: 0; } } @media (min-width: 840px) { /* sidebar */ .app-nav { width: 240px; padding: 16px 12px; } .app-nav a { flex-direction: row; justify-content: flex-start; height: 40px; padding: 0 12px; gap: 10px; } main { margin-left: 240px; } }

Add viewport-fit=cover to the viewport meta tag, or the safe area value stays at zero on iPhone. The colors in our demos:

Tap a color to copy its code.

FAQ

What is the difference between a sidebar and a tab bar?

A sidebar is a column of places down the side of the screen, with room for groups and long lists. A tab bar is a short row of top places, usually at the bottom of a phone screen.

When should I use a sidebar instead of a tab bar?

Use a sidebar when the screen is wide, the app has more than five places, or people add their own, such as projects or channels.

How many items should a tab bar have?

Three to five on a phone. Android's guidance gives that range, and UIKit's tab bar controller swaps in a More item once you add six or more.

Should an iPad app use a sidebar or a tab bar?

Apple suggests a tab bar first. If the app has many sections, let the tab bar convert into a sidebar so people can reach all of them.

Can a phone app use a sidebar?

It can slide one in as a drawer, but it should not stay on screen. For the places people use all day, a visible tab bar is the better home.

Sources

More from Brainy Papers

Keep reading