Skip to content

Bottom Navigation

A mobile navigation bar fixed to the bottom of the viewport. Contains 3–5 icon + label items for primary app sections.

Preview

Anatomy

  • 3–5 items, each with an icon and a short label.
  • Active item uses brand colour for both icon and label.
  • Inactive items use muted colour.
  • Fixed to the viewport bottom in production.

States

StateAppearance
DefaultMuted icon and label
ActiveBrand colour icon and label
HoverText shifts toward primary colour
Focus2 px brand-purple ring

Props

PropTypeDefaultDescription
items{ id: string; label: string; icon: ReactNode; href?: string }[]--Nav items
activeIdstring--Currently active item
onSelect(id: string) => void--Selection handler

Code example

React

tsx
import { BottomNav } from '@thepace/lexicon/components';

<BottomNav
  activeId="home"
  items={[
    { id: 'home', label: 'Home', icon: <HomeIcon /> },
    { id: 'search', label: 'Search', icon: <SearchIcon /> },
    { id: 'library', label: 'Library', icon: <ListIcon /> },
    { id: 'profile', label: 'Profile', icon: <UserIcon /> },
  ]}
  onSelect={setActiveId}
/>

Vanilla HTML

html
<nav class="lex-bottom-nav" aria-label="Main navigation">
  <a class="lex-bottom-nav__item lex-bottom-nav__item--active"
     href="/" aria-current="page">
    <!-- icon -->
    <span>Home</span>
  </a>
  <a class="lex-bottom-nav__item" href="/search">
    <!-- icon -->
    <span>Search</span>
  </a>
</nav>

CSS class reference

ClassPurpose
.lex-bottom-navContainer bar
.lex-bottom-nav__itemNav item
.lex-bottom-nav__item--activeActive state
.lex-bottom-nav__iconItem icon

Accessibility

  • Wrap in <nav aria-label="Main navigation">.
  • Active item uses aria-current="page".
  • All items are keyboard-focusable.
  • Labels should be visible — don't rely on icons alone.

Guidelines

Do

  • Limit to 3–5 items for the most important app sections.
  • Use clear, short labels (one word if possible).
  • Always show labels alongside icons.

Don't

  • Don't use for more than 5 items — overflow makes the bar unusable.
  • Don't duplicate bottom nav items in a top navbar.
  • Don't use on desktop — it's a mobile pattern.

Released under the MIT License. A product by the pace.