Skip to content
IndexRequest a UIAboutContact

Bottom Navigation

A thumb-reachable bar of 3–5 destinations with a sliding active indicator.

Open alone ↗

AI prompt

PROMPT: PASTE INTO YOUR AI CODING TOOL
Build a mobile bottom navigation bar with four tabs: Home, Search, Saved and Profile. Each tab is a button with an inline SVG icon (24px) above a 12px label. The bar is 64px tall, uses a white surface colour with a 1px top border, and the four tabs share the width equally. Add one rounded pill (56x32px, the accent colour at 10% opacity) behind the active icon. When a tab is selected, the pill slides to it using a CSS custom property --i and transform: translateX, 350ms, cubic-bezier(0.3,1.4,0.5,1). The active tab uses the accent colour and aria-current="page". Pressing a tab scales its icon to 0.92. Support keyboard arrows, Home and End, with focus-visible outlines. Update a screen title above the bar when the tab changes. Respect prefers-reduced-motion by removing the overshoot and the scale. Add padding-bottom: env(safe-area-inset-bottom). No libraries.

About this pattern

Definition

A fixed bar at the bottom of a mobile screen that holds three to five top-level destinations. Each destination is an icon with a short label. The active destination is marked by colour and a pill that slides between tabs.

Purpose & UX principles

  • Puts the most-used destinations inside the thumb zone, where one-handed reach is easiest.
  • Keeps the user's position visible at all times, so they never have to guess where they are.
  • Limit it to five items; more than that makes touch targets too small and labels collide.
  • Always show text labels. Icon-only bars are slower to learn.

Interaction states

  • Default: muted icon and label.
  • Active: accent colour, the pill sits behind the icon, aria-current="page".
  • Pressed: icon scales to 0.92.
  • Focus-visible: 2px accent outline around the tab.
  • Keyboard: Left and Right arrows move between tabs, Home and End jump to the first and last.

Motion specification

  • Pill slide: transform translateX, 350ms, cubic-bezier(0.3, 1.4, 0.5, 1) for a slight overshoot.
  • Icon press: scale 0.92, 120ms ease-out.
  • Content change: 160ms fade of the screen title.
  • Reduced motion: the pill jumps without overshoot, no scaling.

Responsive behaviour

  • Phones (under 600px): full-width bar fixed to the bottom, items share the width equally.
  • Tablets and desktops: move these destinations to a side rail or top navigation instead; a bottom bar on a wide screen is far from the cursor.
  • Respect the safe-area inset at the bottom (env(safe-area-inset-bottom)) so the bar clears the home indicator.

Code

HTML
<div class="phone">
  <main class="screen"><p class="eyebrow">Current tab</p><h2 id="title">Home</h2><p>Tap a tab, or focus the bar and use the arrow keys.</p></main>
  <nav class="bnav" aria-label="Primary">
    <span class="pill" aria-hidden="true"></span>
    <button class="tab" aria-current="page" data-t="Home"><svg viewBox="0 0 24 24"><path d="M3 11l9-8 9 8v10h-6v-6H9v6H3z"/></svg><span>Home</span></button>
    <button class="tab" data-t="Search"><svg viewBox="0 0 24 24"><path d="M10 4a6 6 0 104.5 10l5 5 1.5-1.5-5-5A6 6 0 0010 4z"/></svg><span>Search</span></button>
    <button class="tab" data-t="Saved"><svg viewBox="0 0 24 24"><path d="M12 21s-8-5.2-8-11a4.5 4.5 0 018-2.8A4.5 4.5 0 0120 10c0 5.8-8 11-8 11z"/></svg><span>Saved</span></button>
    <button class="tab" data-t="Profile"><svg viewBox="0 0 24 24"><path d="M12 12a4 4 0 100-8 4 4 0 000 8zm-8 9a8 8 0 0116 0z"/></svg><span>Profile</span></button>
  </nav>
</div>

Related patterns

Tab Navigation

↗
Tab NavigationNavigation

Floating Navigation

↗
Floating NavigationNavigation

Top Navigation

↗
Top NavigationNavigation