Skip to content
Sign upPro
ShellMobile tab barMenu

Mobile tab bar (Pro)

ProIncluded in $99

The bottom tab bar for an AI app, with a pill that slides between tabs on a spring and badges that say what is waiting.

ProTap between tabs: the pill slides on a spring. Agents has three runs waiting.

Installation

$ pnpm dlx shadcn@latest add @chatcn-pro/mobile-tab-bar

Needs chatcn Pro

This command works with a Pro license, along with every Pro component.

Or start free: sign up and get three Pro components on us, with a new one every month.

Usage

tsx
import { MobileTabBar } from "@/components/ui/chatcn/pro/mobile-tab-bar"

<MobileTabBar
  tabs={[
    { id: "chats", label: "Chats", icon: <MessagesSquareIcon /> },
    { id: "agents", label: "Agents", icon: <BotIcon />, badge: 3 },
    { id: "library", label: "Library", icon: <LibraryIcon /> },
    { id: "settings", label: "Settings", icon: <SettingsIcon />, badge: true },
  ]}
  value={tab}
  onValueChange={setTab}
/>

A soft pill sits behind the active tab and slides to the next on a critically damped spring; the active icon thickens and its label goes to full ink. Badges take a count (99+ past 99) or true for a dot, in blue, the kit's color for something new rather than something wrong, and are spoken with the tab. The bar is translucent over what scrolls under it and clears the home indicator through the safe area. Mirrored in right to left layouts.

Examples

States

ProThree tabs with a large count, and right to left.

Props

PropTypeNotes
tabsMobileTab[]{ id, label, icon, badge? }
value, defaultValue, onValueChangestringThe active tab
labelsPartial<MobileTabBarLabels>The bar's name and badge words

Keyboard

KeyAction
TabOne stop: the active tab
Arrow left, rightPrevious or next tab, selected as it moves (reversed right to left)
Home, EndFirst or last tab

Accessibility

  • A labelled navigation landmark with a tab list; tabs report which one is selected.
  • Badges are read as part of the tab: Agents, 3 new.

Motion

The pill slides over 460 ms on a critically damped spring and icons dip to 90% while pressed. Under reduced motion the pill moves in place.