Tab bar preview

Tab bar

The bottom navigation of a mobile app: icons, labels, badges and a pill that glides to the active tab.

  • Group
    Mobile
  • Origin
    Inspired · Original (this library)
  • License
    MIT
  • Added
    Oct 22
npx shadcn@latest add @deank/tab-bar

The registry stays private. Install from the repo with a GitHub token — see the README.

Usage

import { TabBar } from "@/registry/components/tab-bar/tab-bar";

<TabBar items={[/* … */]} value="…" onChange={() => {}} />

Props

PropTypeDefaultDescription
itemsTabBarItem[]
valuestring
onChange(id: string) => void
label?string"Primary"Accessible name for the navigation landmark
fixed?booleantrueStick to the bottom of the viewport; off renders it in flow (demos, desktop frames)

When to use

Three to five top-level sections in a mobile web app or PWA.

When not to use

Desktop navigation (use nav-sidebar or floating-dock); switching views inside one page (use segmented-control or direction-aware-tabs).

Related

Nav sidebar · Floating dock · Segmented control · Sheet / drawer