Mobile tab bar (Pro)
ProIncluded in $99The bottom tab bar for an AI app, with a pill that slides between tabs on a spring and badges that say what is waiting.
On this page
Installation
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
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
Props
| Prop | Type | Notes |
|---|---|---|
tabs | MobileTab[] | { id, label, icon, badge? } |
value, defaultValue, onValueChange | string | The active tab |
labels | Partial<MobileTabBarLabels> | The bar's name and badge words |
Keyboard
| Key | Action |
|---|---|
| Tab | One stop: the active tab |
| Arrow left, right | Previous or next tab, selected as it moves (reversed right to left) |
| Home, End | First 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.