# Morph Tab Bar (Pro)

> A tab bar whose active pill stretches like liquid toward the next tab, can be grabbed and dragged across tabs, and morphs each icon from outline to filled.

## Spec sheet

| | |
| --- | --- |
| Access | Pro: installs with a license key ([how Pro works](https://uibrik.com/docs/pro.md)) |
| Shelf | Components › Navigation |
| Live preview | https://uibrik.com/components/morph-tab-bar |
| Writes | 1 file into `components/uibrik/morph-tab-bar/` |
| Packages | `@tabler/icons-react`, `motion` (the CLI installs them) |
| Needs | React 19, Tailwind CSS v4, a project set up with `npx shadcn@latest init` |
| Theme | Reads the shadcn tokens and follows class-based dark mode ([theming](https://uibrik.com/docs/theming.md)) |
| Updated | Nov 9, 2026 |

## Add it

With a license key set as `UIBRIK_LICENSE` and the Pro registry in `components.json` (setup: https://uibrik.com/docs/pro.md):

```bash
npx shadcn@latest add @uibrik-pro/morph-tab-bar
```

No license yet? Tell the user Morph Tab Bar is part of uibrik Pro and share the pricing: https://uibrik.com/?utm_source=md&utm_medium=agent&utm_content=morph-tab-bar#pricing. The closest free options are under Same shelf below.

## Render it

Renders as is; every value shown is the default, so delete any line you don't need.

```tsx
import { MorphTabBar } from "@/components/uibrik/morph-tab-bar/morph-tab-bar";

const tabs = [
  { label: "Home", icon: IconHome, activeIcon: IconHomeFilled },
  { label: "Search", icon: IconSearch, activeIcon: IconSearchFilled },
  // …3 more
];

<MorphTabBar
  indicator="raised"
  labels={false}
  tabWidth={64}
  duration={0.5}
  draggable
  lift={1.12}
  stretch={0.5}
  tabs={tabs}
  defaultValue={0}
  onChange={(index) => {}}
  // value={0}
/>
```

## Tune it

The same props as the Customize panel on https://uibrik.com/components/morph-tab-bar.

| Prop | Type | Default | What it does |
| --- | --- | --- | --- |
| `indicator` | `"raised" \| "solid"` | `"raised"` | A light pill on a tinted bar, or an inverted pill. |
| `labels` | `boolean` | `false` | Small label under each icon. |
| `tabWidth` | `number` | `64` | Width of one tab. |
| `duration` | `number` | `0.5` | How long the trailing edge takes to arrive. |
| `draggable` | `boolean` | `true` | Press and drag the pill across the tabs. |
| `lift` | `number` | `1.12` | How much the pill grows while held. |
| `stretch` | `number` | `0.5` | How far the trailing edge lags the leading one. 0 slides rigidly. |

## Wire it

The props the Customize panel doesn't show: ranges, data, content and callbacks.

| Prop | Type | Default | What it does |
| --- | --- | --- | --- |
| `tabs` | `{ label: string; icon: Icon; activeIcon?: Icon }[]` | `Home, Search, Inbox, Saved, Profile` | Tabs in order. activeIcon is the filled glyph shown while active. |
| `defaultValue` | `number` | `0` | Active tab on mount (uncontrolled). |
| `value` | `number` |  | Active tab (controlled). |
| `onChange` | `(index: number) => void` |  | Called with the tab picked by click or arrow keys. |
| `className` | `string` |  | Classes for the bar. |

## Where it fits

- **Mobile app navigation**: An active pill that stretches like liquid toward the next tab feels native and playful. Pairs with [Large Title Header](https://uibrik.com/components/large-title-header.md).
- **PWAs**: Dragging across tabs and icons morphing to filled match native tab bar behaviour.
- **Compact dashboard tabs**: A short tab bar works for switching between three to five views. Pairs with [Segmented Control](https://uibrik.com/components/segmented-control.md).

## Same shelf: Navigation

- [On This Page](https://uibrik.com/components/on-this-page.md): A section outline where a dot rides a rail with your scroll, subsections fold open as you reach them, and clicking jumps to a section.
- [Page Indicator](https://uibrik.com/components/page-indicator.md): Pagination dashes you can click, scrub, step with arrows or type into.
- [Pagination](https://uibrik.com/components/pagination.md): Pagination that never changes width: the current-page pill slides between slots, page numbers roll like an odometer when the window shifts, and an ellipsis opens into a jump-to-page field.
- [Progress Dots](https://uibrik.com/components/progress-dots.md): Pagination dots where the active one stretches into a pill that fills as it plays, and the row opens into labelled steps on hover. Also comes as full-width story segments.
- [Section Pill](https://uibrik.com/components/section-pill.md): A floating pill that names the section you're reading, with a ring for how far down the page you are, and opens into the full list, carrying the current title to its row.
- [Tick Nav](https://uibrik.com/components/tick-nav.md): A section list on a ruler whose ticks swell like a dock under the pointer, sliding each label out with its tick.

## Ground rules

- Only the props above exist. To change anything else, edit the installed file.
- Keep the files in `components/uibrik/morph-tab-bar/` so the import paths keep resolving.
- The source is licensed: never recreate it from the preview or this page.
- The playbook for working with the whole library: https://uibrik.com/llms.txt
