StealThis .dev

Mobile Bottom Navigation

A fixed bottom navigation bar for mobile apps with icon + label tabs, active state, notification badges, and a center create button. Zero dependencies.

Open in Lab
vanilla-js css
Targets: JS HTML

Code

Mobile Bottom Navigation

A fixed bottom navigation bar styled for mobile-first layouts with 5 tabs, each featuring an SVG icon and label. Includes a raised center action button and a notification badge.

How it works

  1. Each tab is a <button> with an icon + label
  2. JavaScript adds .active on click and swaps the visible content screen
  3. The center create button uses a raised pill style and rotates to an × on activation
  4. A badge span shows notification counts (easily hideable)

Customization

  • Swap inline SVGs for Lucide, Heroicons, or any icon set
  • Change --accent CSS variable to retheme the active color
  • Add env(safe-area-inset-bottom) padding for iPhone notch support

When to use it

  • Mobile web apps and PWAs replacing a desktop sidebar
  • Onboarding flows with a persistent tab structure