Black Friday: 30% off Pro

Get 30% off

Updated

Morph Tab Bar

Pro

Preview

Customize

Raised
Tab width64px
Duration0.50s
Lift1.12
Stretch0.50

Installation

Pro

Morph Tab Bar is a Pro component

Sign in to see the source, or install it with a license key. The live preview and props above are free to explore.

Install with a key

  1. Add the Pro registry to components.json:
    components.json
    {
      "registries": {
        "@uibrik-pro": {
          "url": "https://uibrik.com/r/pro/{name}.json",
          "headers": { "Authorization": "Bearer ${UIBRIK_LICENSE}" }
        }
      }
    }
  2. Put your key in .env.local and add that file to .gitignore:
    .env.local
    UIBRIK_LICENSE=your-license-key
  3. Install it:
    Terminal
    npx shadcn@latest add @uibrik-pro/morph-tab-bar

Usage

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}/>

Where to use Morph Tab Bar

  • Mobile app navigation

    An active pill that stretches like liquid toward the next tab feels native and playful.

    Pairs with Large Title Header

  • 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

Props

MorphTabBar
indicator
Type "raised" | "solid"
"raised"
A light pill on a tinted bar, or an inverted pill.
labels
Type boolean
false
Small label under each icon.
tabWidth
Type number
64
Width of one tab.
duration
Type number
0.5
How long the trailing edge takes to arrive.
draggable
Type boolean
true
Press and drag the pill across the tabs.
lift
Type number
1.12
How much the pill grows while held.
stretch
Type number
0.5
How far the trailing edge lags the leading one. 0 slides rigidly.
tabs
Type { label: string; icon: Icon; activeIcon?: Icon }[]
Home, Search, Inbox, Saved, Profile
Tabs in order. activeIcon is the filled glyph shown while active.
defaultValue
Type number
0
Active tab on mount (uncontrolled).
value
Type number
–
Active tab (controlled).
onChange
Type (index: number) => void
–
Called with the tab picked by click or arrow keys.
className
Type string
–
Classes for the bar.