# Acting tab bar

A tab bar where each icon acts out what it means.

Also called: tab bar, bottom navigation, animated nav icons.

> chatcn Pro: needs a Pro license (https://chatcn.dev/pro). Install from the `@chatcn-pro` registry with your license token; setup at https://chatcn.dev/docs/chatcn-pro.

Example: Icons that act out what they mean. Pick a tab and its icon acts: the house door swings open, the lens sweeps and glints, a letter drops into the tray, the face blinks and smiles. Preview: https://chatcn.dev/preview/acting-tab-bar-demo

Pick a tab and its icon acts it out: the house hops and its door swings open on a warm room, the lens sweeps across the page and glints, a letter drops into the inbox tray and sinks into the slot, and the face looks round, blinks and smiles. The dark pill stretches to the new tab leading edge first, and the icons inside it are a second, inverted copy clipped to the pill, so they change colour exactly where it passes. For the bottom bar of a mobile AI app.

## Installation

```bash
npx shadcn@latest add @chatcn-pro/acting-tab-bar
```

## Usage

```tsx
import { ActingTabBar } from "@/components/ui/chatcn/pro/acting-tab-bar"

<ActingTabBar value={tab} onValueChange={setTab} inboxBadge={unread > 0} />
```

## Props

| Prop | Type | Notes |
| --- | --- | --- |
| `value` / `defaultValue` / `onValueChange` | `"home" | "search" | "inbox" | "profile"` |  |
| `labels` | `Record<tab, string>` | Accessible names |
| `inboxBadge` | `boolean` | A red dot on the inbox |

## Keyboard

| Key | Action |
| --- | --- |
| `Arrow keys` | Previous or next tab |

## Accessibility

- A labelled nav with a real tablist; the inbox name says when it has something new.

## Motion

- Each act runs about a second on keyframes; the pill rides a two edge spring. Reduced motion: no acts, the pill jumps.

Source: https://chatcn.dev/docs/components/acting-tab-bar